Improve ecs query performance;

This commit is contained in:
2025-10-12 19:49:05 +09:00
parent 682200cbf1
commit 6d1b510ac1
27 changed files with 1546 additions and 992 deletions

View File

@@ -3,11 +3,12 @@ using System.Runtime.CompilerServices;
namespace Ghost.Entities.Query;
public interface IQueryTypeParameter
public interface IQueryTypeParameter<T>
where T : IComponentData
{
}
public ref struct CompRef<T> : IQueryTypeParameter
public ref struct CompRef<T> : IQueryTypeParameter<T>
where T : IComponentData
{
internal ref T _value;
@@ -42,7 +43,7 @@ public ref struct CompRef<T> : IQueryTypeParameter
}
}
public ref struct CompRO<T> : IQueryTypeParameter
public readonly ref struct CompRO<T> : IQueryTypeParameter<T>
where T : IComponentData
{
internal readonly ref T _value;