- Home /
Enum become integer in the inspector
Hi,
I am using Unity 3.5.7 and I have such a class:
[Serializable]
public class EffectNode
{
public EffecNodeType m_nodeType;
public List<EffectNode> m_subNodes;
}
This class has an enum field 'm_nodeType'. When I added it to a MonoBehaviour then in the inspector I would see such result.
As you could see the enum of the root level was OK but it become an integer in the element in the sub node list.
Does anyone know how to make the enum work properly in an element in an array as well the root node?
enum.png
(4.9 kB)
Comment
Answer by MagicoCreator · Dec 30, 2013 at 01:39 PM
enum is actually an integer, you just use a word in code to identify it to use it more easily,
Well, of course I know enum is some kind of integer. I just want to it could represent as a drop down list in the inspector in the sub nodes as well ad the root node.