How To: Add Custom Fields

Announcements, support questions, and discussion for the Dialogue System.
davidisak
Posts: 5
Joined: Sun May 10, 2020 1:51 pm

Re: How To: Add Custom Fields

Post by davidisak »

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.
User avatar
Tony Li
Posts: 21981
Joined: Thu Jul 18, 2013 1:27 pm

Re: How To: Add Custom Fields

Post by Tony Li »

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.
davidisak
Posts: 5
Joined: Sun May 10, 2020 1:51 pm

Re: How To: Add Custom Fields

Post by davidisak »

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.

Image
Attachments
missiontype2.png
missiontype2.png (16.65 KiB) Viewed 799 times
User avatar
Tony Li
Posts: 21981
Joined: Thu Jul 18, 2013 1:27 pm

Re: How To: Add Custom Fields

Post by Tony Li »

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
davidisak
Posts: 5
Joined: Sun May 10, 2020 1:51 pm

Re: How To: Add Custom Fields

Post by davidisak »

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.
davidisak
Posts: 5
Joined: Sun May 10, 2020 1:51 pm

Re: How To: Add Custom Fields

Post by davidisak »

Thanks a lot for the super quick response and help. Big 5 star there from me on the asset store! :)
User avatar
Tony Li
Posts: 21981
Joined: Thu Jul 18, 2013 1:27 pm

Re: How To: Add Custom Fields

Post by Tony Li »

Glad to help! :-)
Post Reply