Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't open particle SKS files

I've been making a game with Xcode 6 GM using SpriteKit, and for some reason out of the blue a number of my .SKS particle files are now crashing Xcode which makes them impossible to open. I've also noticed that the files that are crashing Xcode are also crashing my App when unachieved using the NSKeyedUnarchiver. So I'm assuming that given the circumstances of the crashes, some of my SKS files have become corrupt. Is there any resolution to this other than starting from scratch all over again for all of my corrupt SKS particle files? Can I somehow manually modify the SKS files through an external editor and fix the issue? Also are there any steps I can take in the future to ensure my SKS files don't become corrupted again (i.e. is there some bug in Xcode 6 that I should be aware of that's causing corrupted SKS files).

Edit: It appears Xcode is treating these files as Scenes rather than particle files which is leading to the crashes. So for some reason the Xcode 6 GM Sprite Kit Editor is not preserving file format correctly which is leading to particle files being saved as scene files resulting in a corrupted file.

like image 929
Epic Byte Avatar asked Sep 14 '14 05:09

Epic Byte


1 Answers

Do NOT open your SKS particle files in Xcode 6 GM! There is a bug that is causing them to be saved as SKScenes, which leads to the file becoming corrupt.

You need to download Xcode 6.1 beta which fixes the bug in Apple's sprite kit editor.

However, if your file is already corrupted you will need to recreate the particle SKS file from scratch. But if you have a backup like I did you won't need to do this.

But if you don't have a backup, here is a tip for helping you to view your properties of your corrupt emitter so you quickly recreate the SKS file. If you right click your corrupt SKS file and open in Sprite Kit Editor, Xcode will not crash because it will actually select the scene that it incorrectly wrapped your emitter in. And from there you can view the properties of your emitter. I would then take a picture so that now when you recreate the SKS file you can quickly set its properties again. Remember you can't just click the file you need to right click and open in Sprite Kit Editor.

In the future I suggest everyone backup your SKS files as they are and have been very buggy throughout the Xcode 6 betas, and this major bug in the GM is unacceptable. I would also stay away from using SKS files for your scenes because I've had some strange bugs and crashes and the last thing you want is to have to recreate an entire scene! The SKS files can be useful but they weren't ready for release IMO. So either continuously backup your SKS files or just make your scenes and emitters programmatically until Sprite Kit Editor becomes more stable.

like image 123
Epic Byte Avatar answered Oct 12 '22 00:10

Epic Byte