SKTileSet( named: "" ) not working on tvOS

Hi,


besides other features which are not working in the AppleTV - Simulator I discovered that it is NOT possible

to load a previously defined tile set - using the Xcode Tile Set Editor - with the following line of code:



var ts : SKTileSet? = SKTileSet( named: "nameOfTileSet" )


"ts" is always nil.


I cannot access the compiled asset catalog either using NSDataAsset - always nil.


Is this just a simulator thing or what is the case here?


Cheers,


Frank

Replies

Hi Frank,


Thanks for posting your issue here. Unfortunately I'm having trouble reproducing the issue you're seeing. Here are the steps I'm using to try to reproduce:

  1. Create a new tvOS game template project
  2. Create a new SpriteKit Tile Set file
  3. Rename the default "Tile Set" within the new tile set file to "nameOfTileSet"
  4. Add tile set variable to GameScene.swift:
    var ts: SKTileSet? = SKTileSet(named: "nameOfTileSet")


Is it possible that the name you're providing (i.e. nameOfTileSet) is the filename, rather than the name of a tile set that exists within a tile set file? If not, we would greatly appreciate if you filed a bug report and attached the project you're seeing this issue with. This will help us quickly reproduce and address the issue as soon as possible.


Thanks.

Hi,


thank you for the answer. I have to double check. I didn't create a game template based project in Xcode but this shouldn't be a problem.


Someone on the raywenderlich.com - Tutorials team had the same problem:


https://forums.raywenderlich.com/t/what-s-new-in-spritekit-on-ios-10-a-look-at-tile-maps/16330/38


Ok - I will check this tonight and will let you know.


Cheers,


Frank

Hi,


thank you - yes it works now in Beta 4. Providing the name of the TILESET and not the filename of the file where all the tilesets are residing in.


Cheers,


Frank