From 6f3011270ab0bbaff9908644cead38697b59ef16 Mon Sep 17 00:00:00 2001 From: Mikhail <99481254+DCFApixels@users.noreply.github.com> Date: Sat, 1 Apr 2023 22:30:49 +0800 Subject: [PATCH] update core / rename GameObjectRef to UnityGameObject --- src/Runners/Runners.cs | 14 +++++++------- src/{GameObjectRef.cs => UnityGameObject.cs} | 6 +++--- ...meObjectRef.cs.meta => UnityGameObject.cs.meta} | 0 3 files changed, 10 insertions(+), 10 deletions(-) rename src/{GameObjectRef.cs => UnityGameObject.cs} (94%) rename src/{GameObjectRef.cs.meta => UnityGameObject.cs.meta} (100%) diff --git a/src/Runners/Runners.cs b/src/Runners/Runners.cs index ecd5f50..f51e7a1 100644 --- a/src/Runners/Runners.cs +++ b/src/Runners/Runners.cs @@ -7,23 +7,23 @@ public class EcsLateRunSystemRunner : EcsRunner, IEcsLateRunSystem { -#if DEBUG +#if DEBUG && !DISABLE_DRAGONECS_DEBUG private EcsProfilerMarker[] _markers; #endif public void LateRun(EcsPipeline pipeline) { -#if DEBUG +#if DEBUG && !DISABLE_DRAGONECS_DEBUG for (int i = 0; i < targets.Length; i++) { using (_markers[i].Auto()) targets[i].LateRun(pipeline); } #else - foreach (var item in targets) item.LateRun(systems); + foreach (var item in targets) item.LateRun(pipeline); #endif } -#if DEBUG +#if DEBUG && !DISABLE_DRAGONECS_DEBUG protected override void OnSetup() { _markers = new EcsProfilerMarker[targets.Length]; @@ -52,12 +52,12 @@ } public class EcsFixedRunSystemRunner : EcsRunner, IEcsFixedRunSystem { -#if DEBUG +#if DEBUG && !DISABLE_DRAGONECS_DEBUG private EcsProfilerMarker[] _markers; #endif public void FixedRun(EcsPipeline pipeline) { -#if DEBUG +#if DEBUG && !DISABLE_DRAGONECS_DEBUG for (int i = 0; i < targets.Length; i++) { using (_markers[i].Auto()) @@ -68,7 +68,7 @@ #endif } -#if DEBUG +#if DEBUG && !DISABLE_DRAGONECS_DEBUG protected override void OnSetup() { _markers = new EcsProfilerMarker[targets.Length]; diff --git a/src/GameObjectRef.cs b/src/UnityGameObject.cs similarity index 94% rename from src/GameObjectRef.cs rename to src/UnityGameObject.cs index 7e475a7..9d54049 100644 --- a/src/GameObjectRef.cs +++ b/src/UnityGameObject.cs @@ -7,7 +7,7 @@ using UnityEditor; namespace DCFApixels.DragonECS { [DebugColor(DebugColor.Cyan)] - public struct GameObjectRef + public struct UnityGameObject { public GameObject gameObject; public Transform transform; @@ -18,7 +18,7 @@ namespace DCFApixels.DragonECS get => gameObject.name; } - public GameObjectRef(GameObject gameObject) + public UnityGameObject(GameObject gameObject) { this.gameObject = gameObject; transform = gameObject.transform; @@ -65,7 +65,7 @@ namespace DCFApixels.DragonECS ent result = self.NewEntity(); GameObject newGameObject = new GameObject(name); newGameObject.AddComponent()._entity = result; - result.Write() = new GameObjectRef(newGameObject); + result.Write() = new UnityGameObject(newGameObject); #if UNITY_EDITOR if (icon != GameObjectIcon.NONE) diff --git a/src/GameObjectRef.cs.meta b/src/UnityGameObject.cs.meta similarity index 100% rename from src/GameObjectRef.cs.meta rename to src/UnityGameObject.cs.meta