Unable to load custom class 'GameScene' from module '(null)'

For some reason Xcode has started showing this message over the last couple days. Even loading a new SpriteKit project and running it unmodified gets the error.

The scene loads, but is unresponsive.

I've also tried modifying the program by removing the default scene and creating a new one; new SKS file has the same issue. Existing projects still compile and load properly, however.

Considering the default template isn't working out of the box anymore, is this an Xcode update gone wrong, or is there something that can be done to force it to realize the class does, in fact, exist? Thanks!
Hey, I don't know what is doing. Can you explain better?

What is your Xcode version?

Because Xcode 11.5 the SpriteKit temple works pretty well.

There are two things is pass in my mind,

First - you can put the app module on Scene in SKS target

Second - With you have any component attached in your Scene from scene editor, the component need override one property:

Code Block Swift
override class var supportsSecureCoding: Bool { true }


But I really don't know if any this will help you. Hope this help you.
Hi Victor!

Thanks for the reply. I'm running Version 11.5 (11E608c). As mentioned in the original post, even the default SpriteKit project is pitching the error, when it should be a working demo right out of the box. I've also got another project that I'd been working on extensively that has never required me to set the Module field before, which is now on hold while this is being sorted out.

Not sure if it is related, but a bug just started showing up on this mac where audio/video files refuse to play in any apps, and any videos in Safari get blitzed in a half-second.
Wow this is so strange...

I’ll suggest you make a few tries, just trial and error.
  • Try restarting your Mac, sometimes that's enough.

or
  • Delete and install Xcode again.

If none of this works I can't really think of the reason why it is happening, since I have the same version and it is working.
Hey @BigCloudMedia

I've got no answer for you yet but you're not alone. This issue started happening with all my projects yesterday. same error across all classes "Unable to load custom class 'xxxxx' from module '(null)'"

no matter which scene I load from didMove to view in GameViewController I get the same error.

I'm still trying to find a fix for it. Will let you know when I do.

Thanks
Nate
@BigCloudMedia

I've fixed my problem by adding the product module name to the Custom class attributes on each of my scene.sks

The error has gone, the scene loads correctly and now responds touches as before

I had previously renamed my project and then this error happened so maybe that was the reason.

Hope this helps. Good luck with your projects

Hey, did you manage to fix this? We are having the same problem. The only thing that could've messed with how it is working could be the act of deleting all the files in the ~/Library/cache folder we did a few days ago. Tried reinstalling. The older projects are working fine. It is just when we try to make a new one it throws that error.

My issue was linked to a quote (') in the project name, removing it fixed the problem

Unable to load custom class 'GameScene' from module '(null)'
 
 
Q