I am working on project where i want to create some sort of prefab system for spawning objects.
I my game i want that each Entity has EntityId, path to model, size(Vec3) and some random components specific to each object(Entity).
// wall.ron
(
id: EntityId("base:wall"),
path: "assets/models/wall.gltf#Scene0",
size: (
x: 1.0,
y: 2.0,
z: 1.0,
),
components: [
ComponentA(
val_a: 42.0,
val_b: None,
),
ComponentB(
val: 10,
val_max: 10,
),
],
)
On spawning prefab each entity also get inserted transform, scene root for model and collider cube with size.
Then i would like to save scene as level.
In gameplay i need to load that, during gameplay component values might change, then i want to save level. And when i load it back it must stays the same.