Scriptable Objects instead of Enums

one way to avoid issues with enums changing in code is to instead rely on Scriptable objects.

Here’s a github on a bunch of stuff done with scriptable objects: https://github.com/roboryantron/Unite2017

3 Likes

Yup using a Scriptable Object to group that data is also a valid approach. Could be a good option if you want to further expand upon it with tons more colors.

2 Likes

Ya. You could add the materials within the scriptable object themselves as a SerilizeField. The biggest benefit is that a designer could add more colour options and assign them without any coding.

1 Like

Privacy & Terms