From 9cdae69d17c01cd846e1ba00269b161eb49daf19 Mon Sep 17 00:00:00 2001 From: Mikhail <99481254+DCFApixels@users.noreply.github.com> Date: Sat, 28 Mar 2026 19:01:47 +0800 Subject: [PATCH] Update EcsPool.cs --- src/Pools/EcsPool.cs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/Pools/EcsPool.cs b/src/Pools/EcsPool.cs index 801e704..6db76ca 100644 --- a/src/Pools/EcsPool.cs +++ b/src/Pools/EcsPool.cs @@ -385,6 +385,26 @@ namespace DCFApixels.DragonECS #endregion #region Other + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void InvokeOnAdd(int entityID, ref T component) + { + if (_isCustomLifecycle) + { + _customLifecycle.OnAdd(ref component, _worldID, entityID); + } + } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void InvokeOnDel(int entityID, ref T component) + { + if (_isCustomLifecycle) + { + _customLifecycle.OnDel(ref component, _worldID, entityID); + } + else + { + component = default; + } + } void IEcsPool.AddEmpty(int entityID) { Add(entityID); } void IEcsPool.AddRaw(int entityID, object dataRaw) {