Publisher | Advanced Utilities |
---|---|
File size | 1.69MB |
Number of files | 29 |
Latest version | 1 |
Latest release date | 2016-04-05 05:58:24 |
First release date | 2016-01-25 11:30:30 |
Supported Unity versions | 2018.4.2 or higher |
What is it?
This utility will allow you to quickly generate C# enum files from both the resources located within folders in your project and from the data present in an SQLite database file.
Uses
• Controlling what resource files are loaded by building repository classes that take enums allowing you to easily alter filenames without changing hard coded resource loading strings.
• Control your text with a database table that references the enums to a particular value. Then build a dictionary from the enum to the actual value the enum is supposed to represent automatically, and use the dictionary/repo to get any and all text throughout your game. No need to search through files changing hard coded text when you can just change it in your database.
• Translate your game quickly by building that text enum system I just talked about, then replace what text gets put into the dictionary. I use an external file that contains all the games strings that is loaded on game start and the user can replace so that users can make their own translations if they want to.
Why?
Representing data and assets by enums is a great way to keep code clean, effective, and fail fast with the compiler (and not at runtime). By utilizing enums, you can reference in plain english what you want to reference in code rather than using something like a hardcoded string, and if something were to change, then the compiler would more quickly be able to hit you with an error rather than when your players are in the middle of game play.
Clean quick coding
Utilizing enums properly makes for cleaner better code, and this tool will help you quickly regenerate them over lots of data without any manual work besides pressing a button. Simply define your configuration file, attach the script to any object in the editor and hit the "Generate" button.
More
There's more information in the ReadMe.txt, and you can always email me for help. I'd love to see what other uses people can find for this tool and would love to help expand it with those use cases.