Additional Data

6_ScriptableEnums

One benefit of SE is that you can add additional data to this enum since it is just a ScriptableObject. In this example, I added three fields: name, color, and Defeats list. In the code above, I use the Name field to set the text of the TextMeshPro component and the color field to set the color of the renderer. This can be very convenient. Other examples of useful data you can add to these enums include an icon, a localization ID, a VFX prefab, and more.

Last updated