Scene::GetAllComponentsInScene performs dynamic_casts on every single Component of every single GameObject in the scene. Using it occasionally is fine, but doing this multiple times a frame every frame is inefficient., However, there is currently no alternative if, for example, the GameLogicManager needs to call Update on every GameLogicComponent. Implement an alternative.
Scene::GetAllComponentsInScene
performsdynamic_cast
s on every single Component of every single GameObject in the scene. Using it occasionally is fine, but doing this multiple times a frame every frame is inefficient., However, there is currently no alternative if, for example, the GameLogicManager needs to callUpdate
on every GameLogicComponent. Implement an alternative.