Preload the scene? swift

I am making a platform game and my scene has 400 different nodes, so when I go from the main menu to my scene

 self.removeAllChildren () if let nextScene = GameScene(fileNamed: "GameScene"){ let transition = SKTransition.doorway(withDuration: 3) view!.presentScene(nextScene, transition: transition) } 

I have a 3s freeze before my scene appears.

My question is: is there a way to preload the scene while I'm in the main menu to avoid this 3s freeze (which might increase if I add some nodes)

Here is the scene I want to download (I don’t know if this can help)

+5
source share

Source: https://habr.com/ru/post/1259635/


All Articles