Skip to content
This repository was archived by the owner on Mar 25, 2020. It is now read-only.

Database

pointcache edited this page Jan 15, 2017 · 4 revisions

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);
}

Clone this wiki locally