7

I'm following along with this apple doc, but for some reason when I search for "Sprite" under Build Settings in XCode nothing pops up. I've also tried searching for "Enable Texture Atlas Generation" and nothing comes up.

I have Xcode 5.0.2 if that helps.

KingPolygon
  • 4,753
  • 7
  • 43
  • 72
  • 1
    In the Build Settings of Xcode 5.1 you can find it in the "User Defined" section: It's called "SPRITEKIT_TEXTURE_ATLAS_OUTPUT". But I don't know if it's the same in older versions of Xcode. –  Mar 15 '14 at 09:39
  • Appreciate the help, unfortunately I could not find it, so I added it (Plus sign next to the search bar) and set it to YES. But still getting the same error. I updated to 5.1 and same results. – KingPolygon Mar 15 '14 at 09:45
  • Have you tried to create a new "SpriteKit Game" Project in Xcode? In the default project you should definitely find that option. –  Mar 15 '14 at 09:52

2 Answers2

1

The SPRITEKIT_TEXTURE_ATLAS_OUTPUT settings will be there in a new project but the SpriteKit Deployment Options will be created later. Of course you must select SpriteKit Game template when you create the project.

These settings added automatically to your project when you add the first texture atlas resource to it. You need to add a folder named with the .atlas extension. For example you have textures for your hero the atlas should be named as hero.atlas.

skd
  • 31
  • 2
  • I used a view-based application and added the spritekit framework afterwards (including scenes, etc). I'm trying to add a bitmap font (using bmGlyph) and I included my .atlas file and both xml files, but I still can't find the deployment options. – KingPolygon Mar 15 '14 at 11:13
  • To check I just did the same as you described and the settings are here. You wrote "included my .atlas file": did you add the .png files or the folder ? – skd Mar 15 '14 at 11:54
  • That's interesting. I went ahead and built a new view-based project and they weren't there. I built a spritekit project and they were. Hmmm. In terms of the folder, I added the blue folder from my desktop through the file menu in xcode (blue folder there), and copied resources. And still nothing sigh. Thanks for your time btw. – KingPolygon Mar 15 '14 at 23:46
  • By the way I used [this tutorial](http://www.bmglyph.com/tutorials-spritekit-bitmap-font/) on bmGlyph to generate my files and add them to xcode. I'm also using the suggested [BMGlyphLabel](https://github.com/tapouillo/BMGlyphLabel) classes in my project. – KingPolygon Mar 15 '14 at 23:48
  • I have a Sprite Kit project with 2 targets. Weirdly, one target has the setting and the other doesn't! Can't see why. Did you ever figure this out? FYI, copying and pasting the setting from 1 target to another worked... – Smikey May 08 '14 at 11:09
1

I was bedeviled by this exact issue for the past day, when I discovered that if I add an atlas to the project by dragging and dropping, the Sprite Kit Texture Atlas Options were not added to the Build Settings. If I chose File > Add Files to... from the menu bar, however, the Sprite Kit Texture Atlas Options appeared in the Build Settings.

So, apparently, do not drag and drop to add a texture atlas.

Nate Birkholz
  • 2,739
  • 4
  • 20
  • 29