Update RuntimeComponentsDrawer.cs

This commit is contained in:
DCFApixels 2025-05-09 22:18:23 +08:00
parent 236eb3d2bb
commit 09f7c6103d

View File

@ -247,14 +247,19 @@ namespace DCFApixels.DragonECS.Unity.Editors.X
}
_runtimeComponentsDepth++;
try
{
_drawers[_runtimeComponentsDepth].DrawRuntimeComponents(entityID, world, isWithFoldout);
}
finally
{
_runtimeComponentsDepth--;
if (_runtimeComponentsDepth < RuntimeComponentsDepthRoot)
{
_runtimeComponentsDepth = RuntimeComponentsDepthRoot;
}
}
}
private void DrawRuntimeComponents(int entityID, EcsWorld world, bool isWithFoldout)
{
using (EcsGUI.Layout.BeginVertical(UnityEditorUtility.GetTransperentBlackBackgrounStyle())) using (EcsGUI.SetIndentLevel(0))