[英]Can't load texture atlas in Swift playground?
好吧,過去我只是通過鍵入其名稱將SKTextureAtlas加載到我的班級,但是現在在Swift游樂場中我嘗試添加幾個擴展名(.atlas,.spriteatlas,沒有擴展名......)和其他所有內容,但是我得到了錯誤:
Texture Atlas 'testAtlas' cannot be found.
這就是我得到這個:
override init(texture: SKTexture!, color: NSColor!, size: CGSize) {
super.init(texture: texture, color: color, size: size)
atlas = SKTextureAtlas(named: "testAtlas")
print(atlas.textureNames) //to test if got it
}
我認為這是一個問題,他們不是在操場上的目標,但我把它放入我的資源文件夾,它應該能夠識別圖集:
如何在Swift 3的游樂場中獲得紋理圖集?
嘗試將文件夾的名稱更改為testAtlas.atlas
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.