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:
- enable texture atlas generation both project , target (i started "document based application" template, not "spritekit game". has different build settings).
- drag individual texture image files folder,
- rename folder "something.atlas",
- add folder project,
- at runtime, create atlas name (i.e.,
[sktextureatlas atlasnamed:@"something"];
). - obtain individual "textures" name (i.e.,
[_atlas texturenamed:@"mytexture"];
) , createskspritenode
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:
- change folder name english -> clean build folder -> build -> ok
- change folder name japanese -> clean build folder -> build -> atlas broken
- 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
Post a Comment