Type-safe, serializable enum-like values that can be defined across multiple files and across multiple assemblies.When developing cross-project tools and frameworks, you often need to expand some part of the core functionality specifically per-project. Let's say you want to have some typed abstraction (purchase type, character type, anything) via enum and expand it per-project. But if you update your framework or tool, your per-project modifications will be rewritten and lost.PartialEnum solves this issue - it provides cross-assembly enum-like values (that are not actually enums, but look like them) that can be expanded in multiple assemblies, classes etc. It is a niche instrument that can be useful for those who like to develop their own frameworks, template platform projects. If you're a studio or a company and looking to create your own project core - PartialEnum may come in handy.---------------------------------------------------------------------------------📃 DOCS 🌐 WEBSITEIf you have any questions or suggestions, we are reachable via contact.hlmlabs@gmail.comConceptsTag - the type that identifies the enum, used as TypedEnum. It never needs to be partial.Holder - any class or struct marked with [EnumHolder(typeof(Tag))] that declares public static readonly TypedEnum fields. A tag can have any number of holders, in any assembly, and all of their values are merged.The tag is usually its own first holder, which keeps the common case short.How to useDeclare the tag type with [EnumHolder(typeof(YourType))] and add its values as public static readonly TypedEnum fields.To add values from somewhere else, declare another holder for the same tag. Do not redeclare the tag type - a partial type cannot span assemblies, and a second declaration in another namespace creates an unrelated type that will not compile against the original.Serialize TypedEnum on components - the Inspector shows a dropdown of all registered values from all holders.Compare values with == / !=. Use .Value for the underlying int, or rely on ToString() for the field name.Generative AI was used for covers & banners creation.


