-
Notifications
You must be signed in to change notification settings - Fork 5
Database
Database is the backbone of all URSA Serialization.
###Database concepts A Database in URSA is just a folder where your Entities are located. Without database entities are just prefabs with advanced functionality, with database assigned IDs, your entities are fully serializeable on runtime.
About philosophy: Typically Unity developer creates self containing prefabs that have graphics, sounds etc all loaded in one GameObject. Since URSA follows data driven approach where we think of Entity as purely data container, we can go further and think of database prefabs like that as well. If we imagine an entity that acts as data unit, without actually having Assets attached, but rather linked:
Database:
- Uses URSASettings to determine its work folders
- Scans workfolders for all prefabs with Entity and assigns database_ID.
- Creates DatabaseManifest file that helps with searches on runtime.
- Has options in URSAMenu
TODO: Additionally database provides the means to perform advanced searches, like searching by Component , like :
string[] AllWeapons = Database.GetByComponent(typeof(Weapon));
foreach(var w in AllWeapons) {
GameObject prefab = Database.GetPrefab(w);
}