![]() ![]() The database is a ScriptableObject that can be accessed from any scene while the BaseRow is a Class to be displayed in the inspector (of the ScriptableObject) The only real drawback is that adding Enums requires modifying the code It’s an int allowing us to access data quickly while still providing a humanly readable string. It’s lightweight, compiler friendly and strongly typed. The BaseRow class holds the generic dataĮverything is indexed by Enums. The BaseDatabase provides data through an array of BaseRows (allRows) indexed by an Enum (PrimaryKeyEnum). Overall it’s quite simple, they are two main objects: the database and the row, and the database holds an array of rows, all indexed by enums. This is something I would do separately in a struct. For example it is not meant to store something like a large map made of a grid. As a result the DB is not designed to hold large data made of a lot of small data structures. List of all people who contributed (for credits), important milestones, link to important documents, etc.įor ease of use and genericity I decided to use classes (instead of struct) to hold the data. Think of this as light & simple visual programming but with data A layer on top of code to define important variables, events, states and flow. Settings for the engine, debug options, platform specifics, backward compatibility data, systems configs, etc.Ĭode As Data. List of all weapons, monsters, obstacles, bonuses, tiles types, projectiles, buffs, quests, achievements, distances, color palette, difficulties, etc.Įngine. Includes translations in each language, dynamic text with variables, and if needed import / export to Excel or any other format used by translators Heavy assets (2D textures, meshes, sounds…) stored as strings or as Addressable ![]() For my next project I started to build such a database using ScriptableObjects, and I will share some progress here.Įxample of some data & features that could be in this database:Īssets. The goal is not to replace the built-in Asset Database but to organize, manage, find and reference our data more easily. They are many data types, and to manage them it’s quite useful to build a database system within Unity. I strongly believe that what we used to call the Level Editor is now a Data Editor. This is a Tech post, it requires intermediate levels in Unity & C# ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |