Added Ufbx

This commit is contained in:
2026-03-14 18:29:18 +09:00
parent 254b08bc81
commit cce1cf7256
372 changed files with 11672 additions and 154 deletions

View File

@@ -9,7 +9,7 @@ namespace Ghost.Entities;
public interface ISharedComponent;
public interface ISharedWarper
{
public int Index
int Index
{
get; set;
}
@@ -24,7 +24,7 @@ public struct Shared<T> : IComponent, ISharedWarper
}
}
internal unsafe sealed class SharedComponentStore : IDisposable
internal sealed unsafe class SharedComponentStore : IDisposable
{
private struct EntryInfo
{
@@ -88,7 +88,7 @@ internal unsafe sealed class SharedComponentStore : IDisposable
// If collision: fall through to insert (you may want a secondary structure).
}
int index = AllocateEntry(ref store);
var index = AllocateEntry(ref store);
var dst = (byte*)store.data.GetUnsafePtr() + (index * store.typeSize);
MemoryUtility.MemCpy(dst, data, (nuint)store.typeSize);
@@ -168,7 +168,7 @@ internal unsafe sealed class SharedComponentStore : IDisposable
}
// Remove from hash lookup (best-effort; collisions require more robust handling)
long key = ((long)componentTypeId << 32) ^ (uint)info.hashCode;
var key = ((long)componentTypeId << 32) ^ (uint)info.hashCode;
store.hashLookup.Remove(key);
// Push to free-list
@@ -226,16 +226,16 @@ internal unsafe sealed class SharedComponentStore : IDisposable
{
if (store.freeListHead != 0)
{
int idx = store.freeListHead;
var idx = store.freeListHead;
store.freeListHead = store.infos[idx].nextFree;
store.infos[idx].nextFree = -1;
return idx;
}
int newIndex = store.infos.Count;
var newIndex = store.infos.Count;
store.infos.Add(default);
int newByteCount = (newIndex + 1) * store.typeSize;
var newByteCount = (newIndex + 1) * store.typeSize;
store.data.Resize(newByteCount);
return newIndex;

View File

@@ -1167,7 +1167,7 @@ public unsafe partial struct EntityQuery
var it = _mask.writeAccess.GetIterator();
while (it.Next(out var id))
{
for (var i =0; i < 1; i++)
for (var i = 0; i < 1; i++)
{
if (id == runner.componentIDs[i])
{
@@ -1321,7 +1321,7 @@ public unsafe partial struct EntityQuery
var it = _mask.writeAccess.GetIterator();
while (it.Next(out var id))
{
for (var i =0; i < 1; i++)
for (var i = 0; i < 1; i++)
{
if (id == runner.componentIDs[i])
{
@@ -1501,7 +1501,7 @@ public unsafe partial struct EntityQuery
var it = _mask.writeAccess.GetIterator();
while (it.Next(out var id))
{
for (var i =0; i < 1; i++)
for (var i = 0; i < 1; i++)
{
if (id == runner.componentIDs[i])
{
@@ -1707,7 +1707,7 @@ public unsafe partial struct EntityQuery
var it = _mask.writeAccess.GetIterator();
while (it.Next(out var id))
{
for (var i =0; i < 1; i++)
for (var i = 0; i < 1; i++)
{
if (id == runner.componentIDs[i])
{
@@ -1939,7 +1939,7 @@ public unsafe partial struct EntityQuery
var it = _mask.writeAccess.GetIterator();
while (it.Next(out var id))
{
for (var i =0; i < 1; i++)
for (var i = 0; i < 1; i++)
{
if (id == runner.componentIDs[i])
{
@@ -2197,7 +2197,7 @@ public unsafe partial struct EntityQuery
var it = _mask.writeAccess.GetIterator();
while (it.Next(out var id))
{
for (var i =0; i < 1; i++)
for (var i = 0; i < 1; i++)
{
if (id == runner.componentIDs[i])
{
@@ -2481,7 +2481,7 @@ public unsafe partial struct EntityQuery
var it = _mask.writeAccess.GetIterator();
while (it.Next(out var id))
{
for (var i =0; i < 1; i++)
for (var i = 0; i < 1; i++)
{
if (id == runner.componentIDs[i])
{
@@ -2791,7 +2791,7 @@ public unsafe partial struct EntityQuery
var it = _mask.writeAccess.GetIterator();
while (it.Next(out var id))
{
for (var i =0; i < 1; i++)
for (var i = 0; i < 1; i++)
{
if (id == runner.componentIDs[i])
{