fix: Behaviour Collector Not Recognizing Registered GameObjects After Initial Setup
This commit is contained in:
parent
1f8fa78b76
commit
cf8a5de580
|
@ -28,6 +28,9 @@ public class BehaviourCollector<T> : IAssignableGameManager, IEnumerable<T>
|
|||
{
|
||||
gameObject.BehaviourController.OnBehaviourAdded += OnBehaviourAdded;
|
||||
gameObject.BehaviourController.OnBehaviourRemoved += OnBehaviourRemoved;
|
||||
|
||||
foreach (IBehaviour item in gameObject.BehaviourController)
|
||||
OnBehaviourAdded(gameObject.BehaviourController, item);
|
||||
}
|
||||
|
||||
private void OnGameObjectUnregistered(IGameManager manager, IGameObject gameObject)
|
||||
|
|
Loading…
Reference in New Issue