I changed GraphOwner’s Validate as you suggested and it seems to be working as expected. Only boundGraphSerialization remains in the file and graph’s fileID is set to 0. For context, I’m using Unity 2017.3. I intend to switch to 2018.3 when it is out of beta. I noticed there is a preprocessor #if UNITY_2018_3_OR_NEWER here. Will this behaviour be different in this version?
In the new version (pending review), ‘_myVar’ is now displayed as ‘My Var’, as expected
Great!
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.
Yes, that is what I was looking for, thanks!
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.
I tried this, and the difference seems to be that it will keep serializing the data using the name specified in the attribute, while using [FormelySerializedAs] will use the new name of the variable. It would be nice to be able to update all content (Using AssetDatabase.ForceReserializeAssets) and after that to remove the attributes from code again.
Thanks!
Tim
Login
Register
By registering on this website you agree to our Privacy Policy.