I'm have a game, and I'm trying to load a scene other than GameScene. That scene is called MenuScene. I have both a .sks file and .swift file for MenuScene, both called MenuScene. Running the following code in GameViewController, I can at least load MenuScene.sks
if let view = self.view as! SKView? {
if let scene = SKScene(fileNamed: "MenuScene") {
scene.scaleMode = .aspectFill
view.presentScene(scene)
}
view.ignoresSiblingOrder = true
view.showsFPS = false
view.showsNodeCount = false
}
I don't think that MenuScene.swift is being accessed though. I know that didMove(to view: ) isn't getting called, and I thought that when an .sks file loads, the corresponding swift file gets run too, but that appears to not be the case. I have code in MenuScene.swift that I need to be run, but I can't figure out why it's not being run. Help.