You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here is another idea for a cool attribute you could add. I would like to have an enum with a whole bunch of flags I could set by toggling them. I this looks really nice when I put it in my game however I am not exactly sure how to get any useful data out of it just yet. What I want to do with this is check if an enum is toggled and then perform an action, if multiple toggles are set I would like to know that as well. But right now I am getting weird results back from this.
You want something like this maybe?
It's called enum flags and it is a powerful tool indeed, and default unity inspector seems fine to me, although bunch of buttons looks cool and might be useful from time to time. I actually made such thing in my custom inspectors previously so yeah, good idea for an attribute.
Enum flags is a bit tricky to use at first, I've got a tiny bit of helper functions in MyLayers class, but should add more
Here is another idea for a cool attribute you could add. I would like to have an enum with a whole bunch of flags I could set by toggling them. I this looks really nice when I put it in my game however I am not exactly sure how to get any useful data out of it just yet. What I want to do with this is check if an enum is toggled and then perform an action, if multiple toggles are set I would like to know that as well. But right now I am getting weird results back from this.
https://forum.unity.com/threads/enum-flags-as-toggle-buttons.298723/
Also, this has some code to handle putting buttons on new lines when they stretch past what the inspector can handle.
The text was updated successfully, but these errors were encountered: