Merge branch 'dev' into new_system_layers

This commit is contained in:
DCFApixels 2025-04-05 23:33:59 +08:00
commit c0ec93196a
3 changed files with 22 additions and 2 deletions

View File

@ -10,7 +10,7 @@
<RootNamespace>DCFApixels.DragonECS</RootNamespace> <RootNamespace>DCFApixels.DragonECS</RootNamespace>
<Title>DragonECS</Title> <Title>DragonECS</Title>
<Version>0.9.8</Version> <Version>0.9.9</Version>
<Authors>DCFApixels</Authors> <Authors>DCFApixels</Authors>
<Description>ECS Framework for Game Engines with C# and .Net Platform</Description> <Description>ECS Framework for Game Engines with C# and .Net Platform</Description>
<Copyright>DCFApixels</Copyright> <Copyright>DCFApixels</Copyright>

View File

@ -8,7 +8,7 @@
"displayName": "DragonECS", "displayName": "DragonECS",
"description": "C# Entity Component System Framework", "description": "C# Entity Component System Framework",
"unity": "2020.3", "unity": "2020.3",
"version": "0.9.8", "version": "0.9.9",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/DCFApixels/DragonECS.git" "url": "https://github.com/DCFApixels/DragonECS.git"

View File

@ -147,6 +147,20 @@ namespace DCFApixels.DragonECS
return IsAlive; return IsAlive;
} }
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void Unpack(out int id)
{
#if DEBUG
if (IsAlive == false) { Throw.Ent_ThrowIsNotAlive(this); }
#elif DRAGONECS_STABILITY_MODE
if (IsAlive == false)
{
id = EcsConsts.NULL_ENTITY_ID;
return;
}
#endif
id = _id;
}
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
public void Unpack(out int id, out EcsWorld world) public void Unpack(out int id, out EcsWorld world)
{ {
@ -216,6 +230,12 @@ namespace DCFApixels.DragonECS
id = _id; id = _id;
} }
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public bool TryUnpack(out int id)
{
id = _id;
return IsAlive;
}
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
public bool TryUnpack(out int id, out EcsWorld world) public bool TryUnpack(out int id, out EcsWorld world)
{ {