> For the complete documentation index, see [llms.txt](https://obvious-game.gitbook.io/soap/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://obvious-game.gitbook.io/soap/soap-core-assets/scriptable-enum/adding-data.md).

# Adding Data

Scriptable Enum

One benefit of using ScriptableObjects as enums is the ability to easily add additional data, which is not possible with C# enums. For instance, we can include a name, a sprite field and a color field:

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXetOmnrMk4YG21l5aft4zVF6rHqGx6CvoYoPbSBSdVJ_9y9Z1hsAWWxdY_nvdt7Fc26dJt6IMPBo4-Hv8_4Pmol1HcB6aLrhmc4SlcGqTtroQYrStZTTFmjRmhV5zyWitDla_szpkR2ZespxUenKev3wqfM?key=N4RcKQrHpqe_tYkdKbHJhg" alt=""><figcaption></figcaption></figure>

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXc7yTn4ItGcJKBIP6qdowVv5-592aoSvMCL-ipZTvBfJW1bSdAStzZtgEBRxaFPNzGo8ZbYA-7m6jEVhbvlg7FFRgch9a_5T0n1cJSjJNKuAX84PksEw4tWb5fWx6Kc1ikr6m0tGjruRBXPYQM8fVhrD150?key=N4RcKQrHpqe_tYkdKbHJhg" alt="" width="375"><figcaption></figcaption></figure>

You can see how useful and flexible this approach is. It allows for various enhancements, such as adding resistance multipliers to other elements or a list of elements that one destroys. To compare these enums, you can simply compare the reference.&#x20;

Another advantage is that ScriptableEnums can be modified and created at runtime. ScriptableEnums enable much more innovative functionalities, and for more details and examples, you can check out the example scene and its [documentation ](/soap/scene-documentation/6_scriptableenums.md)  as well as the [youtube tutorial.](https://youtu.be/8nHS6m3wNh8)

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdh0hvbjgtl1fWruW44LJ3J_cqozqAeKjai95EFT781J145FgomU9f7ch9CWuTjjWh3EThLqDLN3UggNIJa-UiYaMqrAPHHQboWWJbdJrDzrS773RyZSpO8NAc8qRqNonFOlVozdbawSafm5SlyT1QYdPw?key=N4RcKQrHpqe_tYkdKbHJhg" alt="" width="375"><figcaption></figcaption></figure>
