Reply To: Some questions and requests regarding serialization

NodeCanvas Forums General Discussion Some questions and requests regarding serialization Reply To: Some questions and requests regarding serialization

#13697
Gavalakis
Keymaster

Hello Tim,

Hmm. I haven’t came across your first point about ‘fileID’ changing, but I will take a look at this and see what I find. I have a hunch about what could be going wrong here. Regarding the double serialization (‘boundGraphSerialization’ and ‘_serializedGraph’), actually only ‘boundGraphSerialization’ is needed. ‘_serializedGraph’ seems to be stored with the scene due to the hideFlags of the temporary boundGraphInstance that is created in Validate. Changing the boundGraphInstance.hideFlags to DontSave (in Validate method) will probably fix this problem, but I will need to take a much closer look to ensure everything else works as expected as well.

Please let me address the rest of your questions as well:
– In the new version (pending review), ‘_myVar’ is now displayed as ‘My Var’, as expected. 🙂
– Do you mean using private variables with [SerializeField] for exposing in the inspector as well? If so, you can use the [ExposeField] attribute on a private variable to make it show in the inspector.
– It’s already possible to use the [fsProperty(“previousName”)] attribute which is a property of FullSerializer that NodeCanvas is using. [fsProperty] can work similar to [FormelySerializedAs] attribute. (It can be found in the ‘ParadoxNotion.Serialization.FullSerializer’ namespace). When you are using [fsProperty] by the way, you dont “need” to also use [SerializeField] since it acts the same, but it’s ok if you do though.

Please let me know if the above work for you.
Thanks!

Join us on Discord: https://discord.gg/97q2Rjh