- Home /
Question by
epare025 · Feb 03 at 09:34 PM ·
editoreditor-scripting
How to edit custom class using a Custom Editor and saving the end result?
I have a custom class called "Grid" that contains the following properties: - Node[,] nodes (2d array of data made up of a custom "Node" class) - Vector2Int dimensions - float nodeSize
The Node class consists of Vector3 and booleans. I build the grid through code from a few settings.
I have tried serializedObject.FindProperty("Grid") but this only ever returns null even though the class is set to serializable. I have tried writing to files by serializing the Grid but this resets whenever code compiles.
How does one make changes to custom classes in a custom editor and have the data persist?
Comment