Programmatically create SKTileMapNode in Swift
问题 does anyone know how to create an SKTileMapNode programmatically using Swift please? (NOTE: I do not want to do this using the editor, I want to achieve this programmatically only) I have tried the following but does not render my tile map let bgTexture = SKTexture(imageNamed: "background") let bgDefinition = SKTileDefinition(texture: bgTexture, size: bgTexture.size()) let bgGroup = SKTileGroup(tileDefinition: bgDefinition) let tileSet = SKTileSet(tileGroups: [bgGroup]) let bgNode =