https://github.com/gilzoide/namedenum
Safer alternative to raw enums when used as serialized fields in Unity, maintains the right values after reordering, resistant to code merges
https://github.com/gilzoide/namedenum
enum serializable unity
Last synced: about 2 months ago
JSON representation
Safer alternative to raw enums when used as serialized fields in Unity, maintains the right values after reordering, resistant to code merges
- Host: GitHub
- URL: https://github.com/gilzoide/namedenum
- Owner: gilzoide
- License: unlicense
- Created: 2022-03-18T12:48:41.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-03-25T11:51:57.000Z (over 4 years ago)
- Last Synced: 2025-04-07T20:50:10.157Z (about 1 year ago)
- Topics: enum, serializable, unity
- Language: C#
- Homepage:
- Size: 3.91 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Named Enum
An alternative to raw enums for Unity that serializes the enum name along with
its numeric value.
This makes it possible to reorder enums without breaking existing Unity assets,
including adding new values between existing ones.
Thus they are resistant to code merges where both branches add new values to
the enum.
## Installing the package
Install using [Unity Package Manager](https://docs.unity3d.com/Manual/Packages.html)
adding a package [using this git repository URL](https://docs.unity3d.com/Manual/upm-ui-giturl.html):
https://github.com/gilzoide/NamedEnum.git
## Similar projects
- https://github.com/dotsquid/StableEnum