Scene Graph Assets
Scene Graph Assets are just representations of a scene (physical world). It tells Toolbox what objects to spawn, where to put them, and what to put on them.
Challenge
Scene Graphs must be stored in both binary and text format. The editor deals with text-based assets preferrably, because Git. Games should load scene graphs from binary, because faster access times.
What must be stored
- Multi-root transform hierarchy, including:
- local position
- local scale
- local rotation
- object name
- child transforms
- Prefab references
- If a transform is that of a prefab, what prefab is to be spawned?
- Will we allow prefab overrides like in other engines?
- Objects' components
- What components should Toolbox add to the object?
- Store component-specific serialized properties. (If it's a camera, what color is the sky?)
- Scene components should be addressable, in case an object references another object inside its own scene.
What this gets us
This should be quite obvious. You wouldn't use a text editor that doesn't save your work, would you?
This also opens up the ability to add prefab support to the engine. After all, what is a prefab but a collection of scene objects the engine needs to spawn when requested to?