Posts

Post not yet marked as solved
8 Replies
Facing the same issue and it might be related to the use of Texture Atlases.The following is NOT working with the above mentioned error:let textureAtlas = SKTextureAtlas(named: "some-atlas") let bodyTexture = textureAtlas.textureNamed("some-atlas-image") self.physicsBody = SKPhysicsBody(texture: bodyTexture, size: self.size)But this is working:let sprite = SKSpriteNode(imageNamed: "some-asset") self.physicsBody = SKPhysicsBody(texture: sprite.texture!, size: self.size)I hope it is helpful information as I have no clue what the exact difference is between these code fragments. Both result in a Texture object.