Skip to content

Commit 20c7550

Browse files
revert
1 parent ddab44e commit 20c7550

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Arch/Core/World.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1121,7 +1121,7 @@ public ref T Get<T>(Entity entity)
11211121
[Pure]
11221122
public bool TryGet<T>(Entity entity, out T? component)
11231123
{
1124-
ref var slot = ref EntityInfo.EntityData[entity.Id];
1124+
var slot = EntityInfo.GetEntitySlot(entity.Id);
11251125

11261126
if (!slot.Archetype.TryIndex<T>(out int compIndex))
11271127
{
@@ -1147,7 +1147,7 @@ public bool TryGet<T>(Entity entity, out T? component)
11471147
[Pure]
11481148
public ref T TryGetRef<T>(Entity entity, out bool exists)
11491149
{
1150-
ref var slot = ref EntityInfo.EntityData[entity.Id];
1150+
var slot = EntityInfo.GetEntitySlot(entity.Id);
11511151

11521152
if (!slot.Archetype.TryIndex<T>(out int compIndex))
11531153
{
@@ -1403,7 +1403,7 @@ public void GetRange(Entity entity, Span<ComponentType> types, Span<object?> com
14031403
[Pure]
14041404
public bool TryGet(Entity entity, ComponentType type, out object? component)
14051405
{
1406-
ref var slot = ref EntityInfo.EntityData[entity.Id];
1406+
var slot = EntityInfo.GetEntitySlot(entity.Id);
14071407

14081408
if (!slot.Archetype.TryIndex(type, out int compIndex))
14091409
{

0 commit comments

Comments
 (0)