Update EcsPool.cs

This commit is contained in:
Mikhail 2026-03-28 19:01:47 +08:00
parent 14f8c1a72f
commit 9cdae69d17

View File

@ -385,6 +385,26 @@ namespace DCFApixels.DragonECS
#endregion #endregion
#region Other #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.AddEmpty(int entityID) { Add(entityID); }
void IEcsPool.AddRaw(int entityID, object dataRaw) void IEcsPool.AddRaw(int entityID, object dataRaw)
{ {