문제

I'm starting to use Cocos2dx and I'm having an issue creating a CCSprite from a .png I have. It's like it couldn't found the image from the resources or it is not compatible, because if I choose another one, it works. I also tried with a jpg and it didn't work, so apparently, it just works with some kind of images.

How can I make an image compatible for the CCSprite?

Thanks

도움이 되었습니까?

해결책

You don't need to add it the project as build-native.sh (or.bat) does that.

The image should be in the folder called 'resources' (which will be in the same folder as 'Classes' and 'Proj.Android'.

When you build you app it will be copied in proj.android/assets so check that it gets put in there after you build.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top