开发者

-HD image file not found?

开发者 https://www.devze.com 2023-04-08 14:53 出处:网络
Why am I getting 开发者_Go百科 cocos2d: CCFileUtils: Warning HD file not found: META-hd.png If I definitely have META-hd.png file in my project?

Why am I getting

开发者_Go百科

cocos2d: CCFileUtils: Warning HD file not found: META-hd.png

If I definitely have META-hd.png file in my project?

What I am doing is running my .tmx tilemap. The map uses a tileset that searches for "META.png" (without -hd suffix since I am expecting cocos2d to automatically put it on).


I've found the problem. I only do have -hd versions of my files. But I don't have "non-hd" versions. And for some reason, CCFileUtils will throw me errors when I don't have both types in my project.


Verify that the image is part of the app's target. If it was included as part of a group, and say there was a duplicate on file 10 of 25, the copy stops and files 1-9 are NOT tagged as part of the target. You have to go back and sweep the floor by hand.

In Xcode 4 show the assistant editor, and click the resource in the navigator. The target membership will be shown. If your app is not checked, click on that and voilà, the file will now be found.

In rare cases, i have had to clean the target and recompile to make this effective.


If I understand correctly you will have to have a -hd version of the tilemap as well: meta.tmx and meta-hd.tmx.

Also be sure that your image file is named META-hd.png and not META-HD.png and both images use the same case: META.png and META-hd.png. The iPhone file system is case sensitive (not the iOS Simulator though).

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号