Database schema
Here is the database schema, we use for that example.
- 
        Scene- is linked to Unity scene, it's name should be equal to Unity scene name. It has the following fields:- spawnPosition [Vector3]- position, the player will be moved then he's spawned in this scene
- spawnRotation [Vector3]- rotation, the player will be rotated then he's spawned in this scene
- bounds [Bounds]- area for spawning objects
 
- 
        Collectable- is Scene's nested field, meaning it defines its own table (meta), which is connected toScenetable (meta). It stores all collectable objects in the scene and have the following fields:- position [Vector3]- position of the object
- gold [int]- amount of gold, attached to the object
- type [relationSingle]- type of the object
 
- 
        CollectableType- type of theCollectable- prefab [unityPrefab]- prefab to use as an object to spawn
- audio [audioClip]- sound to play then object is collected
 
- 
        Player- single entity table (meta), which store info about player- gold [int]- amount of gold player gathered
- position [Vector3]- player's position, used by SaveLoad addon to save and load player's position
- rotation [Quaternion]- player's rotation, used by SaveLoad addon to save and load player's position
- scene [string]- player's scene, used by SaveLoad addon to save and load player's position
 

