cocos2dx3.4 new Lua项目后编译黑屏问题的解决
发布时间:2020-12-14 16:49:44 所属栏目:百科 来源:网络整理
导读:方法1. 问题应该是项目的资源路径没有设置好,在AppDelegate::applicationDidFinishLaunching()中添加如下代码: //add search paths///////////////////////////// string strPath = CCFileUtils::getInstance()-getWritablePath(); vector string vtPath =
方法1. 问题应该是项目的资源路径没有设置好,在AppDelegate::applicationDidFinishLaunching()中添加如下代码: //add search paths/////////////////////////////
string strPath = CCFileUtils::getInstance()->getWritablePath();
vector<string> vtPath = CCFileUtils::getInstance()->getSearchPaths();
vtPath.push_back(strPath + "res/");
vtPath.push_back(strPath + "src/");
CCFileUtils::getInstance()->setSearchPaths(vtPath);
/////////////////////////////////////////////
方法2. 将工程项目目录下的res和src文件复制到runtime/win32目录下即可运行。 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |