Post

Replies

Boosts

Views

Activity

Reply to Unable to load custom class 'GameScene' from module '(null)'
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: override class var supportsSecureCoding: Bool { true } But I really don't know if any this will help you. Hope this help you.
Jun ’20
Reply to SKAudioNode problem
So I don't understand your question! the didMove function, is called always when the scene will appear! So once you go to background and back the didMove will called again, and the AudioSet will added one more time on scene! That is the problem the removeFromParent is not working. In fact is working but the didMove func added the node again! Hope this help 😎
Jun ’20
Reply to Up to date SpriteKit Tutorials
Yo, I don't know if you can listen in Portuguese but has a great channel talking about SpriteKit, called Behind Game Lab. the documentation it is awesome to. Past few years SpriteKit didn't change almost anything, so go ahed and pick up this tutorials! And try to understand what's going on, the documentation helps a lot in that. Because once you understand what's going on, it's easy to replicate the concepts.
Jun ’20
Reply to Help needed. Fatal error:Unexpectedly found nil while unwrapping an Optional value
Hey MasterchiefG14, I think the error is in the line 27, where you force an unwrapping trying to cast this " bodyOne.node as! SKSpriteNode" Try make an if let statement playerWeaponHitEnemyUnit(playerWeaponAsset: bodyOne.node as! SKSpriteNode, enemyAsset: bodyTwo.node as! SKSpriteNode) if let spriteBodyOne = bodyOne.node as? SKSpriteNode, let spriteBodyTwo = bodyTwo.node as? SKSpriteNode { playerWeaponHitEnemyUnit(playerWeaponAsset: spriteBodyOne, enemyAsset: spriteBodyTwo) } Do not force unwrapping, because if it's fail the app will crash. Hope this resolve 😎
Jun ’20