I have a CCScene which I originally used in a call to director runWithScene. Then, I use replaceScene to load a few new scenes. This works fine (from Lua of course).
At some point, I want to go back to my original (first) scene. When I do this, before I actually call replaceScene with it, I want to add some children to it by calling scene:addChild.
At this point, I get error:
invalid 'self' in function 'addChild'
This is the same code I ran for the original and subsequent scenes, it fails when I try to director.replace to any scene that was already used (original or subsequent).
Is it not allowed to reuse a scene? If not, what’s going on?