mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 21:01:52 +00:00
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:
@@ -559,6 +559,20 @@ static class ScriptGlue
|
||||
newContext = Internal.UnsafeCastToPtr(newObject);
|
||||
newId = newObject.Id;
|
||||
}
|
||||
|
||||
[RegisterCall("ScriptGlue::Serialization_DeserializeField")]
|
||||
public static void Serialization_DeserializeField(void* internalContext, SerializationType expectedType, MonoString* fieldName, uint8* target)
|
||||
{
|
||||
SerializedObject context = Internal.UnsafeCastToObject(internalContext) as SerializedObject;
|
||||
|
||||
Log.EngineLogger.AssertDebug(context != null);
|
||||
|
||||
char8* name = Mono.mono_string_to_utf8(fieldName);
|
||||
|
||||
context.GetField(StringView(name), expectedType, target);
|
||||
|
||||
Mono.mono_free(name);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
Reference in New Issue
Block a user