It is much better to use ScriptableObjects for many enumerative uses. You can even define additional associated data with each one of them, and drag them into other parts of your game (scenes, prefabs, other ScriptableObjects) however you like. References remain rock solid even if you rename them, reorder them, reorganize them, etc. They are always connected via the meta file GUID.
Collections / groups of ScriptableObjects can also be loaded en-masse with calls such as Resources.LoadAll<T>().
Ah, that’s a decent idea, especially if I wind up stapling more data onto stances later (like the collider parameters).
I hadn’t considered the agony I’d experience if I reordered the enums (or done anything else to mess with their values). I usually don’t serialize them…but this sounds like a scenario where I’d be doing exactly that
You’re welcome. ScriptableObjects are an amazing way to encode complex semantically meaningful typesafe information into your game. It can eliminate all manner of silly code changes to add “one more stance,” for instance.
In my games I use them EVERYWHERE. I can’t live without them.
For instance, here’s a random collection of snaps from various game configuration things for Jetpack Kurt and Pilot Kurt:
Frequently I will put static factory methods to load and / or manage collections of these things, putting those managers right into the ScriptableObject class itself.