Another issue poped into my face, I’ve been on it for a day and a half now.
Basically, I’m in my main menu scene, and I want to go on the house scene when press on a button.
void AppDelegate::changeToScene(CCScene * scene)
CCDirector* director = CCDirector::sharedDirector();
However, the application crashes in the CCMutableArray class
void replaceObjectAtIndex(unsigned int uIndex, T pObject, bool bDeleteObject = true)
on the line pObject->retain()
// add the ref
The scene i’m passing to the AppDelegate function is a public subclass of CCScene.
`class HouseScene : public cocos2d::CCScene
CC_SYNTHESIZE_READONLY(HouseSceneLayer*, layer, Layer);
And this scene is init in ApplicationDidFinishLaunching in the AppDelegate class
`menuScene = MenuScene::node();
houseScene = HouseScene::node();
What could be causing that crash ? I’ve been playing with virtual retain() and virtual release() in the HouseScene class but it doesn’t seem to make a difference.