Serialization: Support sharing object references

This commit is contained in:
Simon Lübeß
2024-04-13 00:50:09 +02:00
parent 949ab4ebb0
commit a3de5ddc9c
5 changed files with 142 additions and 36 deletions
+2 -2
View File
@@ -123,6 +123,7 @@ namespace GlitchyEngine.World
});
_font = new Font(@"C:\Windows\Fonts\arial.ttf", 24);
//_font = new Font(@"C:\Windows\Fonts\Cascadia Code.ttf", 24);
}
public ~this()
@@ -958,9 +959,8 @@ namespace GlitchyEngine.World
*/
public Entity CreateInstance(Entity entity)
{
//Dictionary<UUID, SerializedObject> serializedData = scope .();
ScriptInstanceSerializer scriptSerializer = scope .();
//defer { ClearDictionaryAndDeleteValues!(serializedData); }
scriptSerializer.Init();
List<Entity> newEntities = scope .();
Dictionary<EcsEntity, EcsEntity> sourceToTargetEntity = scope .();