I am trying to integrate Unity’s Localization system with NodeCanvas dialogues by creating custom DT nodes with a LocalizedString field instead of a string. The issue is that the field does not show correctly on the node inspector GUI. It shows fine on a regular component inspector though. I am asuming this is not a problem of unity’s localization, because it does show correctly on a regular editor.
I have attached the code & inspectors for both a node an a regular monobehaviour.
PS: I have also tried with a localized audio and it has the exact same behaviour.
The reason that the editor for LocalizedString (etc) are not shown, is because NodeCanvas is not using Unity serialization but rather a custom one and because of that, native Unity ObjectDrawer and PropertyDrawer are not shown as well. This is because Unity Object and Property Drawer go hand in hand with the Unity serialization system.
With that said however NodeCanvas has its own way of creating Object and Property Drawers, so you could create a custom NodeCanvas ObjectDrawer for the LocalizedString class. I do understand that this might seem redundant, but unfortunately it is the only way due to how Unity Object and Property Drawer only work with Unity SerializedObject and its serialization system.
If you need any help in creating an ObjectDrawer for LocalizedString please let me know. I also plan to have native support for Unity Localization package once it becomes more final and out of preview as well.
Let me know.
Thank you!
Join us on Discord: https://discord.gg/97q2Rjh
Author
Posts
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.
Login
Register
By registering on this website you agree to our Privacy Policy.