mirror of
https://github.com/DCFApixels/DragonECS-Unity.git
synced 2025-09-18 01:54:35 +08:00
fix disabled domain reload
This commit is contained in:
parent
789a16ab29
commit
67677f6a57
@ -324,12 +324,16 @@ namespace DCFApixels.DragonECS.Unity.Editors
|
|||||||
}
|
}
|
||||||
|
|
||||||
#region Default DrawRuntimeData
|
#region Default DrawRuntimeData
|
||||||
[InitializeOnLoadMethod]
|
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)]
|
||||||
private static void ResetRuntimeComponentReflectionCache()
|
private static void ResetRuntimeComponentReflectionCache()
|
||||||
{
|
{
|
||||||
|
foreach (var item in _runtimeComponentReflectionCaches)
|
||||||
|
{
|
||||||
|
item.Value.Dispose();
|
||||||
|
}
|
||||||
_runtimeComponentReflectionCaches.Clear();
|
_runtimeComponentReflectionCaches.Clear();
|
||||||
}
|
}
|
||||||
internal class RuntimeComponentReflectionCache
|
internal class RuntimeComponentReflectionCache : IDisposable
|
||||||
{
|
{
|
||||||
public readonly Type Type;
|
public readonly Type Type;
|
||||||
|
|
||||||
@ -364,6 +368,14 @@ namespace DCFApixels.DragonECS.Unity.Editors
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public void Dispose()
|
||||||
|
{
|
||||||
|
if(Wrapper != null)
|
||||||
|
{
|
||||||
|
UnityObject.DestroyImmediate(Wrapper);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public readonly struct FieldInfoData
|
public readonly struct FieldInfoData
|
||||||
{
|
{
|
||||||
public readonly FieldInfo FieldInfo;
|
public readonly FieldInfo FieldInfo;
|
||||||
@ -469,7 +481,6 @@ namespace DCFApixels.DragonECS.Unity.Editors
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
EditorGUI.BeginChangeCheck();
|
EditorGUI.BeginChangeCheck();
|
||||||
//WrapperBase wrapper = RefEditorWrapper.Take(data);
|
|
||||||
|
|
||||||
RefEditorWrapper wrapper = cache.Wrapper;
|
RefEditorWrapper wrapper = cache.Wrapper;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user