Unity's localization fields not showing correctly on custom nodes

NodeCanvas Forums Support Unity's localization fields not showing correctly on custom nodes

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #15735
    marta.menac
    Participant

    Hello

    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.

     

    Thank you!

    Attachments:
    You must be logged in to view attached files.
    #15743
    Gavalakis
    Keymaster

    Hello there,

    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

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.