Is there any way to unarchive a custom SKSpriteNode
subclass from a SpriteKit Scene File (the one that ends *.sks
)? I am using the SKNode
extension unarchiveFromFile(file)
which returns a scene that I am then copying the SKSpriteNode
I need out of.
I could inside my custom SKSpriteNode
subclass unarchive the sprite from the *.sks
file and then copy over the data I need (i.e. SKTexture
, size, position, SKPhysicsBody
etc.) in the init. I guess I could also make an SKNode
subclass wrapper and assign the sprite from the archive to a sprite property, I am just curious if I am missing something obvious.