Close and restore Prefab windows during scripting reload

This commit is contained in:
2024-04-22 23:58:27 +03:00
parent e573703c4a
commit b958ecc64f
3 changed files with 138 additions and 42 deletions

View File

@@ -1337,12 +1337,6 @@ namespace FlaxEngine.Interop
MethodInfo clearCacheMethod = TypeDescriptionProviderType?.Assembly.GetType("System.ComponentModel.ReflectionCachesUpdateHandler")?.GetMethod("ClearCache");
if (clearCacheMethod != null)
clearCacheMethod.Invoke(null, new object[] { null });
else
{
MethodInfo beforeUpdateMethod = TypeDescriptionProviderType?.Assembly.GetType("System.ComponentModel.ReflectionCachesUpdateHandler")?.GetMethod("BeforeUpdate");
if (beforeUpdateMethod != null)
beforeUpdateMethod.Invoke(null, new object[] { null });
}
Type TypeDescriptorType = typeof(System.ComponentModel.TypeDescriptor);