How To: Add Custom Fields
Re: How To: Add Custom Fields
Yep, it's in the same Editor folder as the CustomFieldType_TemplateType.cs. I can see that none of the overriden draw functions seems to be called.
Re: How To: Add Custom Fields
Does the MissionType example work correctly? If you have copied it, perhaps your copy is conflicting with the original one. I just tested the MissionType example with Unity 2019.3 and the eval version of DS 2.2.6, and it seems to work correctly.
Re: How To: Add Custom Fields
hmm okey, the mission type example is not working correctly for me. It appears as a type that I can choose correctly but I don't get any dropdown to select from in the value as shown in the previous image.
So my process is:
I create a script called CustomFieldType_MissionType.cs in the same folder as the CustomFieldType_TemplateType.cs and then I just remove the Unity default code in it and paste in your example code.
I will poke around some more and see if I can figure out what's wrong. One thing I noticed is that the MissionType appears in the top and not in the bottom of the types as shown in your initial post if that helps anything. Attached image of it.
So my process is:
I create a script called CustomFieldType_MissionType.cs in the same folder as the CustomFieldType_TemplateType.cs and then I just remove the Unity default code in it and paste in your example code.
I will poke around some more and see if I can figure out what's wrong. One thing I noticed is that the MissionType appears in the top and not in the bottom of the types as shown in your initial post if that helps anything. Attached image of it.
- Attachments
-
- missiontype2.png (16.65 KiB) Viewed 799 times
Re: How To: Add Custom Fields
It's OK that Mission Type appears at the top of the dropdown.
Here's a unitypackage with the custom Mission Type if you'd like to give it a try:
DS_CustomFieldType_2020-04-01.unitypackage
Here's a unitypackage with the custom Mission Type if you'd like to give it a try:
DS_CustomFieldType_2020-04-01.unitypackage
Re: How To: Add Custom Fields
I just found the problem now! I put the script under an Editor folder under Assets/ now instead and not at the same place as the template and that solved it. My bad! Thought it had to be in an Editor folder somwhere under the Plugin folder.
Last edited by davidisak on Sun May 10, 2020 4:02 pm, edited 3 times in total.
Re: How To: Add Custom Fields
Thanks a lot for the super quick response and help. Big 5 star there from me on the asset store!
Re: How To: Add Custom Fields
Glad to help!