From cf8a5de58053cf816c20f00a57b6eab326ba14a2 Mon Sep 17 00:00:00 2001 From: Syntriax Date: Tue, 22 Oct 2024 21:46:26 +0300 Subject: [PATCH] fix: Behaviour Collector Not Recognizing Registered GameObjects After Initial Setup --- Engine.Core/BehaviourCollector.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Engine.Core/BehaviourCollector.cs b/Engine.Core/BehaviourCollector.cs index a0661df..bd6e562 100644 --- a/Engine.Core/BehaviourCollector.cs +++ b/Engine.Core/BehaviourCollector.cs @@ -28,6 +28,9 @@ public class BehaviourCollector : IAssignableGameManager, IEnumerable { 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)