This commit is contained in:
Mikhail 2024-11-01 12:44:45 +08:00
parent 1f7ddfd958
commit cec6b210ec
5 changed files with 6 additions and 6 deletions

View File

@ -133,7 +133,7 @@ namespace DCFApixels.DragonECS
goConnects.TryAddOrGet(newEntityID) = new GameObjectConnect(this); goConnects.TryAddOrGet(newEntityID) = new GameObjectConnect(this);
if (applyTemplates) if (applyTemplates)
{ {
ApplyTemplatesFor(world.id, newEntityID); ApplyTemplatesFor(world.ID, newEntityID);
} }
} }
} }

View File

@ -23,12 +23,12 @@ namespace DCFApixels.DragonECS.Unity.Editors
if (world.IsDestroyed) if (world.IsDestroyed)
{ {
var style = UnityEditorUtility.GetStyle(new Color32(255, 75, 0, 100)); var style = UnityEditorUtility.GetStyle(new Color32(255, 75, 0, 100));
GUILayout.Box($"{world.GetMeta().Name} ( {world.id} ) Destroyed", style, GUILayout.ExpandWidth(true)); GUILayout.Box($"{world.GetMeta().Name} ( {world.ID} ) Destroyed", style, GUILayout.ExpandWidth(true));
} }
else else
{ {
var style = UnityEditorUtility.GetStyle(new Color32(75, 255, 0, 100)); var style = UnityEditorUtility.GetStyle(new Color32(75, 255, 0, 100));
GUILayout.Box($"{world.GetMeta().Name} ( {world.id} )", style, GUILayout.ExpandWidth(true)); GUILayout.Box($"{world.GetMeta().Name} ( {world.ID} )", style, GUILayout.ExpandWidth(true));
} }
} }
EcsGUI.Layout.DrawWorldBaseInfo(Target.GetCurrentWorldRaw()); EcsGUI.Layout.DrawWorldBaseInfo(Target.GetCurrentWorldRaw());

View File

@ -52,7 +52,7 @@ namespace DCFApixels.DragonECS.Unity.Internal
return; return;
} }
TypeMeta meta = _world.GetMeta(); TypeMeta meta = _world.GetMeta();
_monitor = new GameObject($"{UnityEditorUtility.TransformToUpperName(meta.Name)} ( {_world.id} )").AddComponent<WorldMonitor>(); _monitor = new GameObject($"{UnityEditorUtility.TransformToUpperName(meta.Name)} ( {_world.ID} )").AddComponent<WorldMonitor>();
UnityEngine.Object.DontDestroyOnLoad(_monitor); UnityEngine.Object.DontDestroyOnLoad(_monitor);
_monitor.Set(_world); _monitor.Set(_world);
_monitor.gameObject.SetActive(false); _monitor.gameObject.SetActive(false);

View File

@ -1043,7 +1043,7 @@ namespace DCFApixels.DragonECS.Unity.Editors
} }
public static void DrawWorldBaseInfo(EcsWorld world) public static void DrawWorldBaseInfo(EcsWorld world)
{ {
bool isNull = world == null || world.IsDestroyed || world.id == 0; bool isNull = world == null || world.IsDestroyed || world.ID == 0;
int entitesCount = isNull ? 0 : world.Count; int entitesCount = isNull ? 0 : world.Count;
int capacity = isNull ? 0 : world.Capacity; int capacity = isNull ? 0 : world.Capacity;
int leakedEntitesCount = isNull ? 0 : world.CountLeakedEntitesDebug(); int leakedEntitesCount = isNull ? 0 : world.CountLeakedEntitesDebug();

View File

@ -7,7 +7,7 @@
public static entlong NewEntityWithGameObject(this EcsWorld world, ITemplateNode template, string name = "Entity", GameObjectIcon icon = GameObjectIcon.NONE) public static entlong NewEntityWithGameObject(this EcsWorld world, ITemplateNode template, string name = "Entity", GameObjectIcon icon = GameObjectIcon.NONE)
{ {
entlong e = world.NewEntityWithGameObject(name, icon); entlong e = world.NewEntityWithGameObject(name, icon);
template.Apply(world.id, e.ID); template.Apply(world.ID, e.ID);
return e; return e;
} }
} }