I wanted to use Unity Localization package for the dialogue tree but I saw there are problems in the inspector for the ObjectDrawer with the LocalizedString property.
I tried to create a custom drawer for the LocalizedString but I don’t understand how to create the default inspector for this property.
Yea, I saw the documentation and tried to create a custom ObjectDrawer for the LocalizedString but I never coded custom editors or attributes.
My custom ObjectDrawer is working and all but I don’t know if there is a way on the “OnGUI override” to create a standard visualization of the existing LocalizedString class, in your examples you’re creating standard float or primitive attributes for structs and classes but there isn’t an example on how to draw a default class and if it’s possible.
Drawers in NodeCanvas are different than Drawers used in Unity by default and as such it is not possible to draw a Unity made (with Unity API) drawer within the NodeCanvas drawers. As such, the class GUI will need to be coded in the NodeCanvas custom ObjectDrawer OnGUI. Within the ObjectDrawer OnGUI method you can use any Unity Editor API you’d like to create a custom GUI for the LocalisedString (or any other class you’d like). But once again, because the drawers in NodeCanvas and the drawers in Unity are different systems (they have to be vbecause they use a different serialization system), it is not possible to draw Unity-made drawers within NodeCanvas drawers.
Please let me know if that clarifies your question.
Thank you!
Join us on Discord: https://discord.gg/97q2Rjh
Author
Posts
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic.
Login
Register
By registering on this website you agree to our Privacy Policy.