Enum Generator for Resources and Sqlite
Advanced Utilities
$0.0
Date |
Price |
---|---|
日時 |
価格($) |
03/19(2018) |
0.0 |
11/27(2024) |
0.0 |
Jump AssetStore
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.