add entlong.NewUnsafe

This commit is contained in:
Mikhail 2023-11-21 10:43:02 +08:00
parent 910dfb2d51
commit cfcd2d131a

View File

@ -95,6 +95,12 @@ namespace DCFApixels.DragonECS
{ {
this.full = full; this.full = full;
} }
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal static unsafe entlong NewUnsafe(long id, long gen, long world)
{
long x = id << 48 | gen << 32 | id;
return *(entlong*)&x;
}
#endregion #endregion
#region TryGetters #region TryGetters