I am having an issue working with Data and SKSpriteNodes. Specifically, the conversion back from Data to SKSpriteNode. I have tried both methods of converting from data to something found here, specifically this line:
let data:SKSpriteNode = Data(buffer: UnsafeBufferPointer(start: &value, count: 1))
and I just cannot seem to get it to work. It always comes up with this error though:
Thread 1: EXC_BAD_ACCESS (code=1, address=0x600000123d40)
Any ideas what could be causing this? Am I trying to convert something too complex?
For reference, I am using iOS 10.3, Swift 3, and Xcode 8.3.2