cocos2dx3.4 new Lua项目后编译黑屏问题的解决

来源:互联网 发布:协同过滤具体算法 编辑:程序博客网 时间:2024/05/30 22:41

方法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目录下即可运行。

0 0
原创粉丝点击