Fixed issue involving stale scripting assemblies in FlaxEngine.Json dynamic type resolution

Added new ExtendedSerializationBinder
Added callback to clear serializer cache on scripting assembly reload
Added low-cost mechanism to invalidate the SerializerCache after domain reload
This commit is contained in:
SS
2023-11-06 18:49:30 -07:00
parent c025b4414c
commit d6e93a7fab
4 changed files with 381 additions and 57 deletions

View File

@@ -1022,6 +1022,8 @@ namespace FlaxEngine.Interop
pair.Value.Free();
classAttributesCacheCollectible.Clear();
FlaxEngine.Json.JsonSerializer.ResetCache();
// Unload the ALC
bool unloading = true;
scriptingAssemblyLoadContext.Unloading += (alc) => { unloading = false; };