Start of Script Instance deserialization

- Also deserialize when stopping the game to restore pre play state
- Fixed ancient bug where ClearDictionaryAndDeleteKeys falsly deletes the dictionary
- Added ClearDictionaryAndDeleteValues helper mixin
This commit is contained in:
Simon Lübeß
2023-12-24 01:30:01 +01:00
parent c9116812b4
commit d0f0a34247
7 changed files with 579 additions and 204 deletions
+1 -5
View File
@@ -960,11 +960,7 @@ static class ScriptEngine
if (script.ScriptClass.ClassName != "SerializationTest")
continue;
SerializedObject object = new SerializedObject(allObjects);
object.Id = script.EntityId;
object.AllObjects = allObjects;
SerializedObject object = new SerializedObject(allObjects, script.EntityId);
object.Serialize(script);
}
}