Skip to content

Commit

Permalink
remove check
Browse files Browse the repository at this point in the history
  • Loading branch information
RevenantX committed Nov 18, 2024
1 parent 2c084de commit 022c47d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions LiteEntitySystem/EntityLogic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,9 @@ internal override void DestroyInternal()
if (Childs.Count > 0)
{
var childsCopy = Childs.ToArray();
if (childsCopy != null) //notify child entities about parent destruction
foreach (var entityLogicRef in childsCopy)
EntityManager.GetEntityById<EntityLogic>(entityLogicRef)?.OnBeforeParentDestroy();
//notify child entities about parent destruction
foreach (var entityLogicRef in childsCopy)
EntityManager.GetEntityById<EntityLogic>(entityLogicRef)?.OnBeforeParentDestroy();
}

base.DestroyInternal();
Expand Down

0 comments on commit 022c47d

Please sign in to comment.