I am a newbie to Cocos2d-x and lua.
I have been trying to use “pushCCObjectToLuaStack” function to pass CCLayer instance to Lua and use it in Lua file.
(I am guessing “pushCCObjectToLuaStack” is a function to pass CCLayer instance to Lua.)
CCLayer *pLayer = CCLayer:create()
m_pEngine->pushCCObjectToLuaStack((CCObject *), “pList”);
but the error msg is the following
attempt to index global ‘pList’ (a nil value)
If anyone know how to use “pushCCObjectToLuaStack” function or other ways to pass CCLayer instance, please help