Skip to content

Commit

Permalink
修复Entity销毁不回收到池子bug (egametang#537)
Browse files Browse the repository at this point in the history
Co-authored-by: fangj <fangjinxx@qq.com>
  • Loading branch information
hi-fangj and gitfangj authored Dec 29, 2023
1 parent 912f9bc commit 99cd0a3
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 99cd0a3

Please sign in to comment.