0

im using spritebuilder to build a game. ive created a new scene called GameOverScene. in the scene i have 2 CCButtons, a CCLabel called highscore, a CCNodeGradient and an image called apple. When i run my project in xcode everything appears apart from the apple image. xcode throws the this error cocos2d: Warning: File not found: ccbResources/apple.jpg but the file is located exactly where xcode is telling me it cant find it.

any ideas on how to solve this problem?

claustro
  • 13
  • 5
  • Did you add the apple.jpg to the ccbResources folder in SpriteBuilder and pressed export? Are you using the default/template files configuration? (i.e. SpriteBuilder generates a `Published-iOS` folder with the relevant resolutions) – lucianomarisi May 06 '14 at 16:15
  • i manually dragged the image to ccbresources via finder. then i dragged the photo in spritebuilder from the ccbresources folder from the left sidemenu to the GameOverScene.ccb. – claustro May 06 '14 at 16:22
  • I think you may have put the image on the wrong place, so probably the best solution is just delete it and add it directly to SpriteBuilder on the `ccbResources` folder (since SpriteBuilder creates other folders like `resources-auto`) – lucianomarisi May 06 '14 at 16:28
  • i think you are correct because all the images that were originally in that folder get displayed properly. However i dont get how i can add this image to the ccbresources in spritebuilder? i cant drag and drop it to the left menu and when i go file > add files it tries to create a ccb file and doesnt let me select an image – claustro May 06 '14 at 16:38
  • doesn't Spritebuilder convert all images to PNG? JPG is a really terrible format to use with cocos2d, unless it's been fixed they are extremely time-consuming to load. ... Huh, I just tried this, I can't even drag & drop a .JPG file into SB, how did you do that? – CodeSmile May 06 '14 at 16:39
  • Yayyy thanks guys :). yeah i guess spritebuilder doesnt allow jpg thats why it wouldnt let me drag and drop it, so like a fool i decided to use finder to drag and drop it. Now that its a png, it actually drags to spritebuilder and is working perfectly. – claustro May 06 '14 at 16:46

0 Answers0