I’m attempting to serialize a private field as shown in 1, but NodeCanvas is failing to serialize the field as shown in 2. 3 Shows Unity serializing the field in a ScriptableObject.
Here you can see the value as serialized in the graph asset file:
I’m using Unity 2020.1.6f1 and NodeCanvas 3.2.2.
Do I have to create a custom ObjectDrawer for this case?
The inspectors in NodeCanvas do not expose private fields by default even if they are set as [Serializable]. While this is different than Unity inspectors, it always felt incorrect to expose private fields.
With that said, you can simply add the [ParadoxNotion.Design.ExposeField] attribute on your private field to expose it in the NodeCanvas inspector (no custom object drawer required).