|
I have the following class structures: I have an editor script to create an instance of the NodeOwner. When I select the asset, the Root node appear fine in the inspector, with its Type set to None, but when I add children, their type defaults to 0 and I cannot choose node types via the inspector. All help appreciated. I found this post but this doesn't seem to work for me: http://answers.unity3d.com/questions/61073/enum-drop-down-menu-in-inspector-for-nested-arrays.html Thanks Bovine
(comments are locked)
|

have you tried to move the enum inside your Node class ?
also your array of children should be of type NodeOwner instead of Node, no ?
Make the NodeType enum serializable as well.
@syclamoth making the NodeType serializable didn't have any effect, but it was working at the top level.
@Oxium - sadly I have too much code in place elsewhere to try this, but in fairness I have moved the enum so often I've probably tried it.
The issue is somewhat moot as I hav a custom editor anyway now...