i am making a little project with SpriteKit in iOS . using SKTextureAtlas , so i make a folder with foo.atlas , put all my png files in it , run , all working fine . but while i remove this folder , and add some pngs to it , and add drag this folder again in the project and run , all my sprites have the wrong postions , and all are wrong positions and size , how to fix this out ? btw , i have try to product -> build clean . but seem not work .
Asked
Active
Viewed 305 times
1
-
1Once created, you don't need to remove the .atlas folder, just modify its contents using Finder. Make sure the .atlas folder has a blue icon in Xcode (folder reference), not a yellow one (group). – CodeSmile Feb 21 '14 at 17:37
-
1What Ray says is right, but I too have had problems with texture atlasas, I now delete and re-add the atlas folder from within Xcode. Also doing a "Build Clean" and/or a simulator "Restart and Reset" can help clear out any old cached images that might be hanging around. – fuzzygoat Feb 22 '14 at 08:29
1 Answers
0
I don't know if this is the reason, but I realized XCode copy new image files in the bundle directory, but doesn't remove the old ones that you have removed in your project. I think XCode only overwrite files. I remove Derived Data from organizer to make sure XCode is not loading at runtime a not removed old one. Same thing in the simulator, XCode doesn't remove old image files, so I delete the app and run it again from XCode.

Luiso
- 1