How to create atlas for SpriteKit
How to create atlas for SpriteKit ?
I tried to transfer all my images to some folder and give it extension. At result folder will called “somefolder.atlas” . Is it right way to use it ?
Solutions Collect From Internet About “How to create atlas for SpriteKit”
Sounds correct. Make sure you also enable atlas generation in Xcode settings (check out the official documentation about this, with step-by-step pictures).
Then, supposing your atlas folder is named “somefolder.atlas” and it contains a file “1.png”, you would do something like this:
SKTextureAtlas *atlas = [SKTextureAtlas atlasNamed:@"somefolder"]; SKTexture *texture = [atlas textureNamed:@"1"]; SKSpriteNode *sprite = [SKSpriteNode spriteWithTexture:texture];
- Update the data of a TableViewController after add item
- Xcode 4 – Is there something in Interface Builder like “reveal in canvas”?
- UISplitViewController in portrait on iPhone shows detail VC instead of master
- From UnsafePointer<UnsafePointer<CFloat>> to an array of floats in Swift?
- Screen capture for iOS
- How to disable Pasting in a TextField in Swift?
- “too many errors emitted stopping now” – How to increase or remove the limit?
- make UIView in UIScrollView stick to the top when scrolled up
- What is $(inherited) in Xcode's search path settings?
- Simplest way to evenly distribute UIButtons horizontally across width of view controller?
- iPhone: keyboard blocks screen
- How to use Keychain for saving password like GenericKeychain sample code
- dynamic libraries in XCode
- Adding pause functionality for NSTimer
- Showing nearby restaurants in MKMap View