Enum Generator

JasonJonesLASM 4 years ago updated by babywka 3 years ago 6

Enum Generator does exactly as it says, and generates Enums from a unit to a pure clean C# file.I used a unit for all the benifits of containing many of these saved into a single graph for quick editing, and the ability to use the Ludiq Drawers for dictionaries.

Download below, but follow these stuff. 

1) Add this package to your project

2) Regenerate units

3) Generate Inspectors.

4) All files generates can be found at "Assets/LifeandStyleMedia/Bolt/Generated/Enums/"

5) RULES: There is a couple things that aren't yet handled automatically that CS files need:

  • No white spaces. 
  • A number can not be the first character.
  • No symbols, just text and numbers.
  • Index keys are impossible to change right now, but will be allowed with a new dictionary type.

Download ENUM GENERATOR Version v1.1.0

Download ENUM GENERATOR v1.0.0


  • Add Generate button directly on the unit.
  • Recreate my own drawer and dictionary type to take advantage of the following:

    • Add the ability to toggle Auto Key Indexing
    • Add Drag and Drop Reording
    • Handle error rrecovery
  • Add Description attribute automatically when numbers come first.
  • Add a text field header or input port for namespaces. Ports would allow any number of units to link to one namespace.
  • Make the unit fixed width and larger, so we can see the text better. (Going to put this on hold, I have yet to find a method that retains the width ratio when changing sizes. So far it just makes the backgound only bigger, take a little more perusing)

Bolt Version:
Unity Version:
Scripting Backend:
.NET Version (API Compatibility Level):

UPDATE Version 1.1.0

- Added the generate button on the unit itself.

- Created a generic button to replace the current one.

API : Now the button is usable and extendable with any of Bolt. Just override it if you use it with your own inspectors and create your own method to replace the current one, takes a System.Action, and a string override.

- Changed to zip files and removed all meta files. Apparently packages pull those and can create issues.

Download Version 1.1.0


how to add this package(enumGenerator) to unity?

by asset/importPackage/customPackage/... - zipFile

or by drag and drop? - folder

Okay I changed it. All links updated.

Download Version 1.1.0

Just drag and drop in now, and should be good. Let me know if it did or didn't work.

Doesn't compatible with Bolt1.4.1. The constructor signature need to add an extra FlowCanvas variable.


Okay, thanks for reporting it! It's been 9 months since the last update, so I can't imagine that being the only error. If it is, should be an easy fix. Think it comes from the Widget editor script.

This would be the last upgrade though. After 1.4.1 I'll have a replacement that is part of something bigger and more versatile.

I'll try to make some time in between projects, adding it to my to do list.