How do you get the original filename of a sprite/texture in Swift?
问题 I create a sprite and assign an image file to it. var logoImage = SKSpriteNode(imageNamed: "image1.png") Then in some circumstances, I change the image. logoImage.texture = SKTexture(imageNamed: "image2.png") In another part of the app I want to check which image is currently being displayed. But I don't know how to get the filename. Using: print(logoImage.texture?.description) Returns: "<SKTexture> 'image2.png' (500 x 500)" Which obviously contains the filename, but how do I get the filename