objective c - Mac SpriteKit - Can't create texture atlas at compile time -


i've been using spritekit while in ios; i'm developing app mac.

i've setup texture atlas usual:

  1. enable texture atlas generation both project , target (i started "document based application" template, not "spritekit game". has different build settings).
  2. drag individual texture image files folder,
  3. rename folder "something.atlas",
  4. add folder project,
  5. at runtime, create atlas name (i.e., [sktextureatlas atlasnamed:@"something"];).
  6. obtain individual "textures" name (i.e., [_atlas texturenamed:@"mytexture"];) , create skspritenode instances them.

i preloading atlas asynchronously, completion handler never gets called (see comments):

_atlas = [sktextureatlas atlasnamed:@"something"];          if (!_atlas) {             nslog(@"error: failed create atlas!");             // line doesn't execute, atlas not nil.         }          [_atlas preloadwithcompletionhandler:^(void){             // block doesn't executed either,              // atlas loading somehow fails...              nslog(@"atlas loaded!");              [self createsprites];         }]; 

when check package contents of build product (e.g., myapp.app), in resources subdirectory can see atlas folder ("something.atlasc"), contains a .plist file no entries, , image resources found... gives?

actually, wasn't workspace after all. same workspace/project, when copied desktop, builds fine.

the cause seems that, 1 of intermediate directories in path project folder had name in japanese characters. tested follows:

  1. change folder name english -> clean build folder -> build -> ok
  2. change folder name japanese -> clean build folder -> build -> atlas broken
  3. change folder name english -> clean build folder -> build -> ok

...(you see pattern)...

i wonder why , how only affects export of texture atlases, , nothing else.

hope experience helps else in future...

i update bug report @ apple well.

update: according apple, issue has been solved of ios 8 beta 2 (build 12a4297e). haven't had opportunity check (the project working @ prototype didn't take off, , settled name change solution). in case, ios 8 final now.


Comments

Popular posts from this blog

php - render data via PDO::FETCH_FUNC vs loop -

c++ - OpenCV Error: Assertion failed <scn == 3 ::scn == 4> in unknown function, -

The canvas has been tainted by cross-origin data in chrome only -