mirror of
https://github.com/DCFApixels/DragonECS-Unity.git
synced 2025-09-18 01:54:35 +08:00
update core / rename GameObjectRef to UnityGameObject
This commit is contained in:
parent
980d7b0f6a
commit
6f3011270a
@ -7,23 +7,23 @@
|
||||
|
||||
public class EcsLateRunSystemRunner : EcsRunner<IEcsLateRunSystem>, 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>, 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];
|
||||
|
@ -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<EcsEntity>()._entity = result;
|
||||
result.Write<GameObjectRef>() = new GameObjectRef(newGameObject);
|
||||
result.Write<UnityGameObject>() = new UnityGameObject(newGameObject);
|
||||
|
||||
#if UNITY_EDITOR
|
||||
if (icon != GameObjectIcon.NONE)
|
Loading…
Reference in New Issue
Block a user