diff --git a/templates/lua-template-runtime/frameworks/runtime-src/Classes/AppDelegate.cpp b/templates/lua-template-runtime/frameworks/runtime-src/Classes/AppDelegate.cpp index af616c011e..53ae01817b 100644 --- a/templates/lua-template-runtime/frameworks/runtime-src/Classes/AppDelegate.cpp +++ b/templates/lua-template-runtime/frameworks/runtime-src/Classes/AppDelegate.cpp @@ -13,10 +13,6 @@ using namespace std; AppDelegate::AppDelegate() { -#if (COCOS2D_DEBUG > 0) - // NOTE:Please don't remove this call if you want to debug with Cocos Code IDE - initRuntime(); -#endif } AppDelegate::~AppDelegate() @@ -37,6 +33,11 @@ void AppDelegate::initGLContextAttrs() bool AppDelegate::applicationDidFinishLaunching() { +#if (COCOS2D_DEBUG > 0) + // NOTE:Please don't remove this call if you want to debug with Cocos Code IDE + initRuntime(); +#endif + // initialize director auto director = Director::getInstance(); auto glview = director->getOpenGLView();