I want to query it from different place in the code and as the director supposed to be my central point of data ,
logically i don’t understand , why the getRunningScene() return NULL , while i have already the _runningScene in the Director class there
why not to set it ?,
Hi,
This happened to me as well. Till the single frame has been outputted it will give your NULL as it should.
I have asked question as well in another thread posted below.
@EvilDeveloper
Thanks for the link. this is what it is. … i guess . there allot of things i don’t “logically” understand in the engine.
when i see method as “getRunningScene()” i expect to get “THE” running scene not some wired logic behind it
especially when i call it after i call the function :
As already explained by the former posts of @EvilDeveloper, the scene is not actually running. It has to prepare itself and render some frames, change its state to running.
If you have to reference to your actual scene before that happens, just use your scene object, which is passed to the runWithScene function call, as I already suggested.