Fixed serialization bug with entity id

This commit is contained in:
2024-12-21 19:32:04 +01:00
parent 288df50558
commit 664626c838
2 changed files with 2 additions and 1 deletions

View File

@@ -53,7 +53,7 @@ Renderable :: struct {
MAX_CHILDREN :: 16;
Entity :: struct {
id: Entity_Id; @Hide
id: Entity_Id; @Hide @DontSerialize
type : Type;
enabled: bool = true;

View File

@@ -180,6 +180,7 @@ register_entity :: (scene: *Scene, entity: *Entity, id: Entity_Id = -1) {
entity.id = next_entity_id;
next_entity_id += 1;
}
array_add(*scene.entities, entity);
#if NETWORKING {