You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When calling SceneManager::findComponents before the game is acutally running, it will return an empty list, even though there are components of the type it should find in the world.
They are initialized in SceneManager::processStateChanges, which has not been called at that point, so all components added so far are still stuck in the mStateChanges vector.
A possible workaround is to call setComponentState, which will call processStateChanges internally like so:
When calling
SceneManager::findComponents
before the game is acutally running, it will return an empty list, even though there are components of the type it should find in the world.This is because these three vectors are empty:
They are initialized in
SceneManager::processStateChanges
, which has not been called at that point, so all components added so far are still stuck in themStateChanges
vector.A possible workaround is to call
setComponentState
, which will callprocessStateChanges
internally like so:Then
findComponents
seems to work fine.The text was updated successfully, but these errors were encountered: