mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 13:01:52 +00:00
Ecs changes
- BitArray has always at least sizeof(uint) bits - Renamed Entity to EcsEntity - Added value parameter to EcsWorld.AssignComponent - Matched EcsWorld generic parameters - Added Scene - Added Entity
This commit is contained in:
@@ -33,9 +33,9 @@ namespace GlitchyEngine.Content
|
||||
CGLTF.Free(data);
|
||||
}
|
||||
|
||||
private static void NodesToEntities(CGLTF.Data* data, CGLTF.Node* node, Entity? parentEntity, EcsWorld world, Effect validationEffect, Material material, List<AnimationClip> clips)
|
||||
private static void NodesToEntities(CGLTF.Data* data, CGLTF.Node* node, EcsEntity? parentEntity, EcsWorld world, Effect validationEffect, Material material, List<AnimationClip> clips)
|
||||
{
|
||||
Entity entity = world.NewEntity();
|
||||
EcsEntity entity = world.NewEntity();
|
||||
|
||||
#if DEBUG
|
||||
var nameComponent = world.AssignComponent<DebugNameComponent>(entity);
|
||||
@@ -122,7 +122,7 @@ namespace GlitchyEngine.Content
|
||||
{
|
||||
for(var primitive in node.Mesh.Primitives)
|
||||
{
|
||||
Entity meshEntity = world.NewEntity();
|
||||
EcsEntity meshEntity = world.NewEntity();
|
||||
|
||||
var meshParent = world.AssignComponent<ParentComponent>(meshEntity);
|
||||
meshParent.Entity = entity;
|
||||
|
||||
@@ -18,6 +18,11 @@ namespace GlitchyEngine.Math
|
||||
|
||||
public this(int initialCapacity = sizeof(uint))
|
||||
{
|
||||
var initialCapacity;
|
||||
|
||||
if (initialCapacity < sizeof(uint))
|
||||
initialCapacity = sizeof(uint);
|
||||
|
||||
EnsureCapacity(initialCapacity);
|
||||
}
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ namespace GlitchyEngine.Renderer
|
||||
LineGeometry.SetVertexLayout(layout..ReleaseRefNoDelete());
|
||||
}
|
||||
|
||||
public static void BeginScene(EcsWorld world, Entity cameraEntity)
|
||||
public static void BeginScene(EcsWorld world, EcsEntity cameraEntity)
|
||||
{
|
||||
Debug.Profiler.ProfileRendererFunction!();
|
||||
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
using GlitchyEngine.Math;
|
||||
|
||||
namespace GlitchyEngine.World
|
||||
{
|
||||
struct SimpleTransformComponent
|
||||
{
|
||||
public Matrix Transform = Matrix.Identity;
|
||||
|
||||
public this()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public this(Matrix transform)
|
||||
{
|
||||
Transform = transform;
|
||||
}
|
||||
}
|
||||
|
||||
struct SpriterRendererComponent
|
||||
{
|
||||
public ColorRGBA Color = .White;
|
||||
|
||||
public this()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public this(ColorRGBA color)
|
||||
{
|
||||
Color = color;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
|
||||
using internal GlitchyEngine.World;
|
||||
|
||||
namespace GlitchyEngine.World
|
||||
{
|
||||
public struct EcsEntity : uint64
|
||||
{
|
||||
// Binary Format:
|
||||
// Bits: [0 - 31] [32 - 64]
|
||||
// Data: Version Index
|
||||
|
||||
[Inline]
|
||||
internal uint32 Version => (uint32)this;
|
||||
|
||||
[Inline]
|
||||
internal uint32 Index => (uint32)(this >> 32);
|
||||
|
||||
[Inline]
|
||||
static internal EcsEntity CreateEntityID(uint32 index, uint32 version)
|
||||
{
|
||||
return ((uint64)index << 32) | version;
|
||||
}
|
||||
|
||||
[Inline]
|
||||
internal bool IsValid => Index != InvalidEntity.Index;
|
||||
|
||||
public const EcsEntity InvalidEntity = CreateEntityID(uint32.MaxValue, 0);
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,7 @@ namespace GlitchyEngine.World
|
||||
{
|
||||
const int MaxEntities = 1024;
|
||||
|
||||
internal typealias BitmaskEntry = (Entity ID, BitArray ComponentMask);
|
||||
internal typealias BitmaskEntry = (EcsEntity ID, BitArray ComponentMask);
|
||||
internal List<BitmaskEntry> _entities = new .();
|
||||
|
||||
List<uint32> _freeIndices = new List<uint32>() ~ delete _;
|
||||
@@ -40,11 +40,11 @@ namespace GlitchyEngine.World
|
||||
|
||||
delete _componentPools;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Registers a new Component.
|
||||
*/
|
||||
public void Register<T>() where T: struct
|
||||
public void Register<T>() where T: struct, new
|
||||
{
|
||||
uint32 id = (uint32)_componentPools.Count;
|
||||
ComponentPool<T> componentPool = new ComponentPool<T>(MaxEntities);
|
||||
@@ -55,7 +55,7 @@ namespace GlitchyEngine.World
|
||||
/**
|
||||
* Registers a new Component.
|
||||
*/
|
||||
public void Register<T>() where T: struct, IDisposableComponent
|
||||
public void Register<T>() where T: struct, new, IDisposableComponent
|
||||
{
|
||||
uint32 id = (uint32)_componentPools.Count;
|
||||
ComponentPool<T> componentPool = new ComponentPool<T>(MaxEntities);
|
||||
@@ -88,23 +88,23 @@ namespace GlitchyEngine.World
|
||||
/**
|
||||
* Creates a new Entity and returns its ID.
|
||||
*/
|
||||
public Entity NewEntity()
|
||||
public EcsEntity NewEntity()
|
||||
{
|
||||
Entity entity;
|
||||
EcsEntity entity;
|
||||
|
||||
// Reuse freed entity slot
|
||||
if(_freeIndices.Count > 0)
|
||||
{
|
||||
uint32 index = _freeIndices.PopBack();
|
||||
|
||||
entity = Entity.CreateEntityID(index, _entities[index].ID.Version);
|
||||
entity = EcsEntity.CreateEntityID(index, _entities[index].ID.Version);
|
||||
|
||||
_entities[index].ID = entity;
|
||||
}
|
||||
// Create new entity slot
|
||||
else
|
||||
{
|
||||
entity = Entity.CreateEntityID((.)_entities.Count, 0);
|
||||
entity = EcsEntity.CreateEntityID((.)_entities.Count, 0);
|
||||
_entities.Add((entity, new BitArray(_componentPools.Count)));
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ namespace GlitchyEngine.World
|
||||
/**
|
||||
* Removes the specified Entity from the World.
|
||||
*/
|
||||
public void RemoveEntity(Entity entity)
|
||||
public void RemoveEntity(EcsEntity entity)
|
||||
{
|
||||
var listEntity = ref _entities[entity.Index];
|
||||
if(entity != listEntity.ID)
|
||||
@@ -123,7 +123,7 @@ namespace GlitchyEngine.World
|
||||
DisposeComponents(listEntity);
|
||||
|
||||
// Invalidate entry and increment version
|
||||
listEntity.ID = Entity.CreateEntityID(Entity.InvalidEntity.Index, entity.Version + 1);
|
||||
listEntity.ID = EcsEntity.CreateEntityID(EcsEntity.InvalidEntity.Index, entity.Version + 1);
|
||||
|
||||
_entities[entity.Index].ComponentMask.Clear();
|
||||
_freeIndices.Add(entity.Index);
|
||||
@@ -152,7 +152,7 @@ namespace GlitchyEngine.World
|
||||
/**
|
||||
* Assigns a component of type T to the specified entity and returns it.
|
||||
*/
|
||||
public T* AssignComponent<T>(Entity entity) where T : struct, new
|
||||
public T* AssignComponent<T>(EcsEntity entity, T value = T()) where T : struct, new
|
||||
{
|
||||
if(entity.Index > _entities.Count)
|
||||
return null;
|
||||
@@ -165,8 +165,12 @@ namespace GlitchyEngine.World
|
||||
ComponentPoolEntry entry;
|
||||
if(!_componentPools.TryGetValue(typeof(T), out entry))
|
||||
{
|
||||
Log.EngineLogger.AssertDebug(false, scope $"Tried to assign unregistered component type {typeof(T)}");
|
||||
return null;
|
||||
Register<T>();
|
||||
|
||||
entry = _componentPools[typeof(T)];
|
||||
|
||||
//Log.EngineLogger.AssertDebug(false, scope $"Tried to assign unregistered component type {typeof(T)}");
|
||||
//return null;
|
||||
}
|
||||
|
||||
// TODO: is it a problem to assign a component again?
|
||||
@@ -177,7 +181,7 @@ namespace GlitchyEngine.World
|
||||
|
||||
T* component = (T*)entry.Pool.Get(entity.Index);
|
||||
|
||||
*component = T();
|
||||
*component = value;
|
||||
|
||||
return component;
|
||||
}
|
||||
@@ -185,7 +189,7 @@ namespace GlitchyEngine.World
|
||||
/**
|
||||
* Removes a component of type T from the specified entity.
|
||||
*/
|
||||
public void RemoveComponent<T>(Entity entity) where T : struct
|
||||
public void RemoveComponent<T>(EcsEntity entity) where T : struct, new
|
||||
{
|
||||
if(entity.Index > _entities.Count)
|
||||
return;
|
||||
@@ -205,7 +209,7 @@ namespace GlitchyEngine.World
|
||||
listEntity.ComponentMask[entry.Id] = false;
|
||||
}
|
||||
|
||||
public void RemoveComponent<T>(Entity entity) where T : struct, IDisposableComponent
|
||||
public void RemoveComponent<T>(EcsEntity entity) where T : struct, new, IDisposableComponent
|
||||
{
|
||||
if(entity.Index > _entities.Count)
|
||||
return;
|
||||
@@ -228,7 +232,21 @@ namespace GlitchyEngine.World
|
||||
DisposeComponent<T>(entry.Pool.Get(entity.Index));
|
||||
}
|
||||
|
||||
public T* GetComponent<T>(Entity entity) where T : struct
|
||||
/// Returns whether or not the given entity has the specified component.
|
||||
public bool HasComponent<T>(EcsEntity entity) where T : struct, new
|
||||
{
|
||||
var listEntity = ref _entities[entity.Index];
|
||||
if(entity != listEntity.ID)
|
||||
return false;
|
||||
|
||||
ComponentPoolEntry entry;
|
||||
if(!_componentPools.TryGetValue(typeof(T), out entry))
|
||||
return false;
|
||||
|
||||
return listEntity.ComponentMask[entry.Id];
|
||||
}
|
||||
|
||||
public T* GetComponent<T>(EcsEntity entity) where T : struct, new
|
||||
{
|
||||
var listEntity = ref _entities[entity.Index];
|
||||
if(entity != listEntity.ID)
|
||||
@@ -244,7 +262,7 @@ namespace GlitchyEngine.World
|
||||
|
||||
return (.)entry.Pool.Get(entity.Index);
|
||||
}
|
||||
|
||||
|
||||
public WorldEnumerator Enumerate(params Type[] componentTypes)
|
||||
{
|
||||
return WorldEnumerator(this, componentTypes);
|
||||
@@ -279,7 +297,7 @@ namespace GlitchyEngine.World
|
||||
|
||||
world.Register<TransformComponent>();
|
||||
|
||||
Entity entity = world.NewEntity();
|
||||
EcsEntity entity = world.NewEntity();
|
||||
|
||||
TransformComponent* myComp = world.AssignComponent<TransformComponent>(entity);
|
||||
myComp.LocalTransform = Matrix.Identity;
|
||||
@@ -289,7 +307,7 @@ namespace GlitchyEngine.World
|
||||
|
||||
world.RemoveComponent<TransformComponent>(entity);
|
||||
|
||||
Entity entity2 = world.NewEntity();
|
||||
EcsEntity entity2 = world.NewEntity();
|
||||
world.AssignComponent<TransformComponent>(entity2);
|
||||
|
||||
world.RemoveEntity(entity);
|
||||
@@ -330,7 +348,7 @@ namespace GlitchyEngine.World
|
||||
// Test dispose on component removal
|
||||
{
|
||||
// Create entity with disposable component.
|
||||
Entity entity = world.NewEntity();
|
||||
EcsEntity entity = world.NewEntity();
|
||||
var component = world.AssignComponent<TestDisposingComponent>(entity);
|
||||
component.IsDisposed = false;
|
||||
|
||||
@@ -342,7 +360,7 @@ namespace GlitchyEngine.World
|
||||
// Test dispose on entity removal
|
||||
{
|
||||
// Create entity with disposable component.
|
||||
Entity entity = world.NewEntity();
|
||||
EcsEntity entity = world.NewEntity();
|
||||
var component = world.AssignComponent<TestDisposingComponent>(entity);
|
||||
component.IsDisposed = false;
|
||||
|
||||
|
||||
@@ -4,27 +4,53 @@ using internal GlitchyEngine.World;
|
||||
|
||||
namespace GlitchyEngine.World
|
||||
{
|
||||
public struct Entity : uint64
|
||||
{
|
||||
// Binary Format:
|
||||
// Bits: [0 - 31] [32 - 64]
|
||||
// Data: Version Index
|
||||
public struct Entity
|
||||
{
|
||||
private EcsEntity _entity = .InvalidEntity;
|
||||
|
||||
[Inline]
|
||||
internal uint32 Version => (uint32)this;
|
||||
private Scene _scene = null;
|
||||
|
||||
[Inline]
|
||||
internal uint32 Index => (uint32)(this >> 32);
|
||||
|
||||
[Inline]
|
||||
static internal Entity CreateEntityID(uint32 index, uint32 version)
|
||||
public EcsEntity Handle => _entity;
|
||||
|
||||
public Scene Scene => _scene;
|
||||
|
||||
public this()
|
||||
{
|
||||
return ((uint64)index << 32) | version;
|
||||
}
|
||||
|
||||
public this(EcsEntity entity, Scene scene)
|
||||
{
|
||||
_entity = entity;
|
||||
_scene = scene;
|
||||
}
|
||||
|
||||
public bool IsValid => _entity.IsValid;
|
||||
|
||||
public T* AddComponent<T>(T value = T()) where T: struct, new
|
||||
{
|
||||
Log.EngineLogger.AssertDebug(!HasComponent<T>(), scope $"Entity already has component.");
|
||||
|
||||
return _scene._ecsWorld.AssignComponent<T>(_entity, value);
|
||||
}
|
||||
|
||||
public T* GetComponent<T>() where T: struct, new
|
||||
{
|
||||
Log.EngineLogger.AssertDebug(HasComponent<T>(), "Entity doesn't have component!");
|
||||
|
||||
return _scene._ecsWorld.GetComponent<T>(_entity);
|
||||
}
|
||||
|
||||
[Inline]
|
||||
internal bool IsValid => Index != InvalidEntity.Index;
|
||||
public bool HasComponent<T>() where T: struct, new
|
||||
{
|
||||
return _scene._ecsWorld.HasComponent<T>(_entity);
|
||||
}
|
||||
|
||||
public void RemoveComponent<T>() where T: struct, new
|
||||
{
|
||||
Log.EngineLogger.AssertDebug(HasComponent<T>(), "Entity doesn't have component!");
|
||||
|
||||
_scene._ecsWorld.RemoveComponent<T>(_entity);
|
||||
}
|
||||
|
||||
public const Entity InvalidEntity = ((uint64)uint32.MaxValue << 32) | 0;//TODO: Report bug: CreateEntityID(uint32.MaxValue, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,6 @@ namespace GlitchyEngine.World
|
||||
*/
|
||||
public struct ParentComponent
|
||||
{
|
||||
public Entity Entity;
|
||||
public EcsEntity Entity;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
using GlitchyEngine.Math;
|
||||
using GlitchyEngine.Renderer;
|
||||
using System;
|
||||
|
||||
namespace GlitchyEngine.World
|
||||
{
|
||||
class Scene
|
||||
{
|
||||
internal EcsWorld _ecsWorld = new .() ~ delete _;
|
||||
|
||||
public this()
|
||||
{
|
||||
Entity entity = CreateEntity();
|
||||
entity.AddComponent<SpriterRendererComponent>(.(ColorRGBA(0.2f, 0.9f, 0.15f)));
|
||||
}
|
||||
|
||||
public ~this()
|
||||
{
|
||||
}
|
||||
|
||||
public void Update(GameTime gameTime)
|
||||
{
|
||||
//TransformSystem.Update(_ecsWorld);
|
||||
|
||||
for (var (entity, transform, sprite) in _ecsWorld.Enumerate<SimpleTransformComponent, SpriterRendererComponent>())
|
||||
{
|
||||
Renderer2D.DrawQuad(transform.Transform, sprite.Color);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public Entity CreateEntity(String name = "")
|
||||
{
|
||||
Entity entity = Entity(_ecsWorld.NewEntity(), this);
|
||||
entity.AddComponent<SimpleTransformComponent>(.(.Identity));
|
||||
|
||||
let nameComponent = entity.AddComponent<DebugNameComponent>();
|
||||
nameComponent.SetName(name.IsEmpty ? "Entity" : name);
|
||||
|
||||
return entity;
|
||||
}
|
||||
|
||||
public void DestroyEntity(Entity entity)
|
||||
{
|
||||
_ecsWorld.RemoveEntity(entity.Handle);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -16,7 +16,7 @@ namespace GlitchyEngine.World
|
||||
}
|
||||
}
|
||||
|
||||
private static void UpdateEntity(Entity entity, TransformComponent* transform, EcsWorld world)
|
||||
private static void UpdateEntity(EcsEntity entity, TransformComponent* transform, EcsWorld world)
|
||||
{
|
||||
// Todo: test scaling with deep hierarchies!
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ using internal GlitchyEngine.World;
|
||||
|
||||
namespace GlitchyEngine.World
|
||||
{
|
||||
public struct WorldEnumerator : IEnumerator<Entity>, IDisposable
|
||||
public struct WorldEnumerator : IEnumerator<EcsEntity>, IDisposable
|
||||
{
|
||||
internal EcsWorld _world;
|
||||
internal BitArray _bitMask;
|
||||
@@ -37,14 +37,14 @@ namespace GlitchyEngine.World
|
||||
}
|
||||
}
|
||||
|
||||
public Result<Entity> GetNext() mut
|
||||
public Result<EcsEntity> GetNext() mut
|
||||
{
|
||||
while(_currentEntry < _endEntry)
|
||||
{
|
||||
EcsWorld.BitmaskEntry* entry = _currentEntry++;
|
||||
|
||||
// Skip deleted entities
|
||||
if(entry.ID.Index == Entity.InvalidEntity.Index)
|
||||
if(entry.ID.Index == EcsEntity.InvalidEntity.Index)
|
||||
continue;
|
||||
|
||||
// Check whether or not mask matches
|
||||
@@ -61,7 +61,7 @@ namespace GlitchyEngine.World
|
||||
}
|
||||
}
|
||||
|
||||
public struct WorldEnumerator<TComponent> : WorldEnumerator, IEnumerator<(Entity Entity, TComponent* Component)> where TComponent : struct
|
||||
public struct WorldEnumerator<TComponent> : WorldEnumerator, IEnumerator<(EcsEntity Entity, TComponent* Component)> where TComponent : struct
|
||||
{
|
||||
internal EcsWorld.ComponentPoolEntry* _componentPool;
|
||||
|
||||
@@ -70,9 +70,9 @@ namespace GlitchyEngine.World
|
||||
_componentPool = &world.GetComponentPool<TComponent>();
|
||||
}
|
||||
|
||||
public new Result<(Entity Entity, TComponent* Component)> GetNext() mut
|
||||
public new Result<(EcsEntity Entity, TComponent* Component)> GetNext() mut
|
||||
{
|
||||
Result<Entity> entity = base.GetNext();
|
||||
Result<EcsEntity> entity = base.GetNext();
|
||||
|
||||
if(entity case .Err)
|
||||
return .Err;
|
||||
@@ -84,7 +84,7 @@ namespace GlitchyEngine.World
|
||||
}
|
||||
|
||||
public struct WorldEnumerator<TComponent0, TComponent1> : WorldEnumerator,
|
||||
IEnumerator<(Entity Entity, TComponent0* Component0, TComponent1* Component1)>
|
||||
IEnumerator<(EcsEntity Entity, TComponent0* Component0, TComponent1* Component1)>
|
||||
where TComponent0 : struct where TComponent1 : struct
|
||||
{
|
||||
internal EcsWorld.ComponentPoolEntry* _componentPool0;
|
||||
@@ -96,9 +96,9 @@ namespace GlitchyEngine.World
|
||||
_componentPool1 = &world.GetComponentPool<TComponent1>();
|
||||
}
|
||||
|
||||
public new Result<(Entity Entity, TComponent0* Component0, TComponent1* Component1)> GetNext() mut
|
||||
public new Result<(EcsEntity Entity, TComponent0* Component0, TComponent1* Component1)> GetNext() mut
|
||||
{
|
||||
Result<Entity> entity = base.GetNext();
|
||||
Result<EcsEntity> entity = base.GetNext();
|
||||
|
||||
if(entity case .Err)
|
||||
return .Err;
|
||||
@@ -111,7 +111,7 @@ namespace GlitchyEngine.World
|
||||
}
|
||||
|
||||
public struct WorldEnumerator<TComponent0, TComponent1, TComponent2> : WorldEnumerator,
|
||||
IEnumerator<(Entity Entity, TComponent0* Component0, TComponent1* Component1, TComponent2* Component2)>
|
||||
IEnumerator<(EcsEntity Entity, TComponent0* Component0, TComponent1* Component1, TComponent2* Component2)>
|
||||
where TComponent0 : struct where TComponent1 : struct where TComponent2 : struct
|
||||
{
|
||||
internal EcsWorld.ComponentPoolEntry* _componentPool0;
|
||||
@@ -125,9 +125,9 @@ namespace GlitchyEngine.World
|
||||
_componentPool2 = &world.GetComponentPool<TComponent2>();
|
||||
}
|
||||
|
||||
public new Result<(Entity Entity, TComponent0* Component0, TComponent1* Component1, TComponent2* Component2)> GetNext() mut
|
||||
public new Result<(EcsEntity Entity, TComponent0* Component0, TComponent1* Component1, TComponent2* Component2)> GetNext() mut
|
||||
{
|
||||
Result<Entity> entity = base.GetNext();
|
||||
Result<EcsEntity> entity = base.GetNext();
|
||||
|
||||
if(entity case .Err)
|
||||
return .Err;
|
||||
@@ -141,7 +141,7 @@ namespace GlitchyEngine.World
|
||||
}
|
||||
|
||||
public struct WorldEnumerator<TComponent0, TComponent1, TComponent2, TComponent3> : WorldEnumerator,
|
||||
IEnumerator<(Entity Entity, TComponent0* Component0, TComponent1* Component1, TComponent2* Component2, TComponent3* Component3)>
|
||||
IEnumerator<(EcsEntity Entity, TComponent0* Component0, TComponent1* Component1, TComponent2* Component2, TComponent3* Component3)>
|
||||
where TComponent0 : struct where TComponent1 : struct where TComponent2 : struct where TComponent3 : struct
|
||||
{
|
||||
internal EcsWorld.ComponentPoolEntry* _componentPool0;
|
||||
@@ -157,9 +157,9 @@ namespace GlitchyEngine.World
|
||||
_componentPool3 = &world.GetComponentPool<TComponent3>();
|
||||
}
|
||||
|
||||
public new Result<(Entity Entity, TComponent0* Component0, TComponent1* Component1, TComponent2* Component2, TComponent3* Component3)> GetNext() mut
|
||||
public new Result<(EcsEntity Entity, TComponent0* Component0, TComponent1* Component1, TComponent2* Component2, TComponent3* Component3)> GetNext() mut
|
||||
{
|
||||
Result<Entity> entity = base.GetNext();
|
||||
Result<EcsEntity> entity = base.GetNext();
|
||||
|
||||
if(entity case .Err)
|
||||
return .Err;
|
||||
|
||||
Reference in New Issue
Block a user