fix: Issues With Behaviours Entering / Leaving the Hierarchy Callbacks Not Firing
This commit is contained in:
@@ -140,12 +140,12 @@ public class GameManager : BaseEntity, IGameManager
|
||||
gameObject.OnFinalized += OnGameObjectFinalize;
|
||||
gameObject.OnExitedHierarchy += OnGameObjectExitedHierarchy;
|
||||
|
||||
foreach (ITransform child in gameObject.Transform.Children)
|
||||
Register(child.GameObject);
|
||||
|
||||
if (!gameObject.Initialize())
|
||||
throw new Exception($"{nameof(gameObject)} can't be initialized");
|
||||
|
||||
foreach (ITransform child in gameObject.Transform.Children)
|
||||
Register(child.GameObject);
|
||||
|
||||
_gameObjects.Add(gameObject);
|
||||
_hierarchyObjects.Add(gameObject);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user