diff --git a/src/Pools/EcsPoolBase.cs b/src/Pools/EcsPoolBase.cs index 48ca7d5..d7423e6 100644 --- a/src/Pools/EcsPoolBase.cs +++ b/src/Pools/EcsPoolBase.cs @@ -341,17 +341,17 @@ namespace DCFApixels.DragonECS [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal static void InvokeOnAdd(this StructList self, int entityID) + internal static void InvokeOnAdd(ref this StructList self, int entityID) { for (int i = 0; i < self.Count; i++) { self[i].OnAdd(entityID); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal static void InvokeOnAdd(this StructList self, int entityID, int cachedCount) + internal static void InvokeOnAdd(ref this StructList self, int entityID, int cachedCount) { for (int i = 0; i < cachedCount; i++) { self[i].OnAdd(entityID); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal static void InvokeOnAddAndGet(this StructList self, int entityID) + internal static void InvokeOnAddAndGet(ref this StructList self, int entityID) { for (int i = 0; i < self.Count; i++) { @@ -360,7 +360,7 @@ namespace DCFApixels.DragonECS } } [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal static void InvokeOnAddAndGet(this StructList self, int entityID, int cachedCount) + internal static void InvokeOnAddAndGet(ref this StructList self, int entityID, int cachedCount) { for (int i = 0; i < cachedCount; i++) { @@ -369,22 +369,22 @@ namespace DCFApixels.DragonECS } } [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal static void InvokeOnGet(this StructList self, int entityID) + internal static void InvokeOnGet(ref this StructList self, int entityID) { for (int i = 1; i < self.Count; i++) { self[i].OnGet(entityID); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal static void InvokeOnGet(this StructList self, int entityID, int cachedCount) + internal static void InvokeOnGet(ref this StructList self, int entityID, int cachedCount) { for (int i = 1; i < cachedCount; i++) { self[i].OnGet(entityID); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal static void InvokeOnDel(this StructList self, int entityID) + internal static void InvokeOnDel(ref this StructList self, int entityID) { for (int i = 0; i < self.Count; i++) { self[i].OnDel(entityID); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal static void InvokeOnDel(this StructList self, int entityID, int cachedCount) + internal static void InvokeOnDel(ref this StructList self, int entityID, int cachedCount) { for (int i = 0; i < cachedCount; i++) { self[i].OnDel(entityID); } }