internal static void AppendArchetypesToQueryData(EntityQueryData *queryData, Archetype **archetypes, int count) { var size = count * sizeof(Archetype *); queryData->archetypes = MemoryUtility.ReallocPtrArray <Archetype>(queryData->archetypes, queryData->archetypeCount + count); Buffer.MemoryCopy(archetypes, queryData->archetypes + queryData->archetypeCount, size, size); queryData->archetypeCount += count; }
internal void Dispose() { if (m_EntitiesCapacity > 0) { UnsafeUtility.Free(Version, Allocator.Persistent); Version = null; Archetype = null; ChunkData = null; #if UNITY_EDITOR Name = null; #endif m_EntitiesCapacity = 0; } if (m_ComponentTypeOrderVersion != null) { UnsafeUtility.Free(m_ComponentTypeOrderVersion, Allocator.Persistent); m_ComponentTypeOrderVersion = null; } }
public ParallelReader(Archetype **ptr, int length) { Ptr = ptr; Length = length; }
public unsafe UnsafeArchetypePtrList(int initialCapacity, Allocator allocator, NativeArrayOptions options = NativeArrayOptions.UninitializedMemory) { Ptr = null; Length = 0; Capacity = 0; Allocator = Allocator.Invalid; this.ListData() = new UnsafePtrList(initialCapacity, allocator, options); }
public unsafe UnsafeArchetypePtrList(Archetype **ptr, int length) { Ptr = null; Length = 0; Capacity = 0; Allocator = Allocator.Invalid; this.ListData() = new UnsafePtrList((void **)ptr, length); }