Skip to content

Commit

Permalink
修复Entity销毁不回收到池子bug (#537)
Browse files Browse the repository at this point in the history
Co-authored-by: fangj <[email protected]>
  • Loading branch information
egametang and gitfangj committed Dec 30, 2023
1 parent e56cb45 commit eee7fb2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Unity/Assets/Scripts/Core/Entity/Entity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -534,12 +534,12 @@ public override void Dispose()

base.Dispose();

status = EntityStatus.None;

if (this.IsFromPool)
{
ObjectPool.Instance.Recycle(this);
}

status = EntityStatus.None;
}

private void AddToComponents(Entity component)
Expand Down

0 comments on commit eee7fb2

Please sign in to comment.