Hi all,
I have a question regarding the possibility of modifying the contents of an enumerator using the inspector window. I want to store accessible controls/settings as an enumerator value to determine what control/setting is being referenced when I make calls in game, but for ease of use I’d like to pair the contents of a database that stores scriptable objects in an array to the available enumerator values. These scriptable objects store common data that is specific to settings/controls such as the enumerator value as a variable to dictate what input/setting is being called (To be clear, settings and controls are separate but I want to utilize the same concept for both).
Currently, I define the enumerator values as well as the database and setting/input objects manually but I wanted to see if I could link/modify the contents of the enumerator prior to run-time based on the contents of the scriptable object array on the database using something like OnValidate(). The name for each enumerator value would be derived from a string variable on the scriptable objects. Does anyone have any suggestions or Unity documentation links for accomplishing something like this? Or even if it is not possible/recommended, I would appreciate any insight.