From a7f269a0f2511abc9e59d7ad72bed53c6a648726 Mon Sep 17 00:00:00 2001 From: DCFApixels <99481254+DCFApixels@users.noreply.github.com> Date: Fri, 9 May 2025 19:45:01 +0800 Subject: [PATCH] update EntitySlotInfo --- src/DebugUtils/Editor/EntlongDrawer.cs | 3 ++- src/Internal/Editor/EcsGUI.Layout.cs | 1 + src/Internal/Editor/EcsGUI.cs | 9 +++++---- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/DebugUtils/Editor/EntlongDrawer.cs b/src/DebugUtils/Editor/EntlongDrawer.cs index 179e22c..c6eb69f 100644 --- a/src/DebugUtils/Editor/EntlongDrawer.cs +++ b/src/DebugUtils/Editor/EntlongDrawer.cs @@ -1,4 +1,5 @@ #if UNITY_EDITOR +using DCFApixels.DragonECS.Core.Unchecked; using DCFApixels.DragonECS.Unity.Internal; using System.Reflection; using UnityEditor; @@ -50,7 +51,7 @@ namespace DCFApixels.DragonECS.Unity.Editors SerializedProperty fulleProperty = property.FindPropertyRelative("_full"); EntitySlotInfo entity = new EntitySlotInfo(fulleProperty.longValue); - EcsWorld.TryGetWorld(entity.world, out EcsWorld world); + EcsWorld.TryGetWorld(entity.worldID, out EcsWorld world); if (drawFoldout && isExpanded) { diff --git a/src/Internal/Editor/EcsGUI.Layout.cs b/src/Internal/Editor/EcsGUI.Layout.cs index 66ed1b9..341dfa0 100644 --- a/src/Internal/Editor/EcsGUI.Layout.cs +++ b/src/Internal/Editor/EcsGUI.Layout.cs @@ -1,4 +1,5 @@ #if UNITY_EDITOR +using DCFApixels.DragonECS.Core.Unchecked; using DCFApixels.DragonECS.Unity.Editors.X; using DCFApixels.DragonECS.Unity.Internal; using System.Collections.Generic; diff --git a/src/Internal/Editor/EcsGUI.cs b/src/Internal/Editor/EcsGUI.cs index 8e4e9f3..48107a2 100644 --- a/src/Internal/Editor/EcsGUI.cs +++ b/src/Internal/Editor/EcsGUI.cs @@ -1,5 +1,6 @@ #if UNITY_EDITOR using DCFApixels.DragonECS.Core; +using DCFApixels.DragonECS.Core.Unchecked; using DCFApixels.DragonECS.Unity.Internal; using System; using System.Collections.Generic; @@ -592,11 +593,11 @@ namespace DCFApixels.DragonECS.Unity.Editors public static void EntityField(Rect position, DragonGUIContent label, EntitySlotInfo entity) { bool isAlive = false; - if (EcsWorld.TryGetWorld(entity.world, out EcsWorld world)) + if (EcsWorld.TryGetWorld(entity.worldID, out EcsWorld world)) { isAlive = world.IsAlive(entity.id, entity.gen); } - EntityField_Internal(position, label, entity.id == 0, isAlive ? EntityStatus.Alive : EntityStatus.NotAlive, entity.id, entity.gen, entity.world); + EntityField_Internal(position, label, entity.id == 0, isAlive ? EntityStatus.Alive : EntityStatus.NotAlive, entity.id, entity.gen, entity.worldID); } public static void EntityField(Rect position, SerializedProperty property) { @@ -613,11 +614,11 @@ namespace DCFApixels.DragonECS.Unity.Editors else { bool isAlive = false; - if (EcsWorld.TryGetWorld(entity.world, out EcsWorld world)) + if (EcsWorld.TryGetWorld(entity.worldID, out EcsWorld world)) { isAlive = world.IsAlive(entity.id, entity.gen); } - EntityField_Internal(position, label, entity.id == 0, isAlive ? EntityStatus.Alive : EntityStatus.NotAlive, entity.id, entity.gen, entity.world); + EntityField_Internal(position, label, entity.id == 0, isAlive ? EntityStatus.Alive : EntityStatus.NotAlive, entity.id, entity.gen, entity.worldID); } }