How can I make enum variables show as a dropdown in C#?
With this code they just show as int.
using UnityEngine;
using System;
[Serializable]
public class SimpleExample
{
public enum Example
{
example1,
example2
}
public Example DropdownHere;
}
Oh! Forgot to mention I'm actually using a list of SimpleExample class in a MonoBehaviour script. Just noticed that the enum works just fine when directly in the MonoBehaviour script, still I'd like to make it work this way.
Monobehaviour class script:
using UnityEngine;
using System.Collections.Generic;
public class SimpleMonoBehaviourExample: MonoBehaviour
{
public List<SimpleExample> SimpleExampleList;
}