onAssignCCBMemberVariable Callback not fired

onAssignCCBMemberVariable Callback not fired
0.0 0


I am new to using cocos builder. I have added a sprite to the CCNode in cocos builder. I have given it a name and am trying to assign in to sprite variable in my class. I have set the type to “Doc Root Var” in Code Connections in Cocos Builder. But the function
bool GameScreenLayer::onAssignCCBMemberVariable(CCObject* pTarget, const char* pMemberVariableName, CCNode* pNode) { return false; }
does not get fired. I have put a debug point in it. What am I doing wrong? The ccbi file loads correctly in the sense that I can the output on the emulator screen. Please help. Thanks.


make sure you are a sub-class of

public cocos2d::extension::CCBMemberVariableAssigner


My class is a sub-class of public cocos2d::extension::CCBMemberVariableAssigner



I was having the same problem. Turns out my class was using private inheritance instead of public inheritance. Make sure you’ve got public in front of the parent class name.

Hope that helps.