feat: implement asynchronous asset management system with texture streaming support
This commit is contained in:
@@ -49,7 +49,7 @@ internal sealed unsafe class ChunkDebugView
|
||||
|
||||
private static object[] GetItems(ref readonly Chunk chunk)
|
||||
{
|
||||
#if !(DEBUG || GHOST_EDITOR)
|
||||
#if !DEBUG
|
||||
return [];
|
||||
#else
|
||||
var pData = chunk.GetUnsafePtr();
|
||||
@@ -185,7 +185,7 @@ internal unsafe struct Archetype : IDisposable
|
||||
private int _maxComponentID;
|
||||
private int _entityIdsOffset;
|
||||
|
||||
// -1 means no cleanup component, 0 means haven't computed yet (since 0 is the empty archetype), positive value means the archetype id of the cleanup edge.
|
||||
// 0 means no cleanup component (since 0 is the empty archetype), -1 means haven't computed yet, positive value means the archetype id of the cleanup edge.
|
||||
internal int _cleanupEdge;
|
||||
|
||||
public readonly Identifier<Archetype> ID => _id;
|
||||
@@ -248,7 +248,7 @@ internal unsafe struct Archetype : IDisposable
|
||||
}
|
||||
}
|
||||
|
||||
if (cleanupCount == 0)
|
||||
if (cleanupCount > 0)
|
||||
{
|
||||
_cleanupEdge = -1;
|
||||
}
|
||||
|
||||
@@ -291,14 +291,15 @@ public unsafe partial class EntityManager : IDisposable
|
||||
|
||||
ref var archetype = ref _world.ComponentManager.GetArchetypeReference(location.archetypeID);
|
||||
|
||||
if (archetype._cleanupEdge < 0)
|
||||
// 0 means no cleanup component (since 0 is the empty archetype), -1 means haven't computed yet, positive value means the archetype id of the cleanup edge.
|
||||
if (archetype._cleanupEdge == 0)
|
||||
{
|
||||
return DestroyEntity_Internal(entity, location);
|
||||
}
|
||||
else
|
||||
{
|
||||
Identifier<Archetype> newArcID = default;
|
||||
if (archetype._cleanupEdge == 0)
|
||||
if (archetype._cleanupEdge < 0)
|
||||
{
|
||||
ref var signature = ref archetype._signature;
|
||||
|
||||
|
||||
@@ -7,11 +7,6 @@
|
||||
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
<IsAotCompatible>True</IsAotCompatible>
|
||||
<IsTrimmable>True</IsTrimmable>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
|
||||
<IsAotCompatible>True</IsAotCompatible>
|
||||
<IsTrimmable>True</IsTrimmable>
|
||||
|
||||
Reference in New Issue
Block a user