Custom enumeration class accessible through inspector?

Hi! I am working on my custom enumeration class, I think it looks beautiful and most of all in my opinion it’s a good OOP solution. Any ideas how could I make its values (sword, exampleValue, troll) public CustomEnumeration dropDownList; accessible through inspector?

using System.Collections.Generic;
using System.Collections.ObjectModel;

public class CustomEnumeration
    public readonly Vector3 Position;
    public readonly string Word;

    //Easy foreach imitation
    protected static readonly List<CustomEnumeration> _enumeration = new List<CustomEnumeration>();
    public static ReadOnlyCollection<CustomEnumeration> Enumeration
            return _enumeration.AsReadOnly();

    public static readonly CustomEnumeration sword = new CustomEnumeration(new Vector3(0,0,0), "Sw0rd");
    public static readonly CustomEnumeration exampleValue = new CustomEnumeration(new Vector3(1, 2, 3), "example");
    public static readonly CustomEnumeration troll = new CustomEnumeration(new Vector3(3, 2, 1), "troll");

    //PROTECTED constructor - only here (in this script) we can create enum values
    protected CustomEnumeration(Vector3 position, string word)
        this.Position = position;
        this.Word = word;

    public void DoSth()
        //Instead of switch statements we can expand our enumeration class by creating methods
        //So OOP
        //Such CleanCode
        //Doge is dead meme like Harambe

Hello ShivekGG,

I believe you want to use something like SerializeField.


public enum MyWeapons
    Knives, Rope, Dagger, Chains, Rocks, Laser_beams, Acid, Body_bag

public MyWeapons weaponEnum;

If you’re making your own custom classes you might want to take a look at this too.