使用版本,0.12.0 .
问题是这样的:iphone 模拟器下正常。真机调试的时候,找不到资源(图片),pPorgressTip 为 0.
因为用到retina 模式,Resourceses 下放 progresstip-hd.png
使用下面语句加载。
CCSprite* pProgressTip=CCSprite::spriteWithFile(“progresstip.png”);
跟到函数里:
CCTexture2D * CCTextureCache::addImage(const char * path){
。。。。
pathKey = CCFileUtils::fullPathFromRelativePath(pathKey.c_str());
会有下列提示:
Cocos2d: cocos2d: CCFileUtils: Warning HD file not found: @
发现是在 CCFIleUtils_ios.mm 里的函数
static NSString* getDoubleResolutionImage(NSString* path) {
NSFileManager *fileManager = init] autorelease];
if( )
return retinaName;
CCLOG("cocos2d: CCFileUtils: Warning HD file not found: %@", );
请教达人:它在哪里找文件呢?上面函数里有提到相对路径,它相对那个?
或者说,资源文件如何设置才正确呢?
谢谢!