How to temporarily present another SKScene without cancelling all active SKActions on active scene?

I'm presenting a temporary sub-scene (a pause menu) using SKView.presentScene(...). I'm finding that when I do this, any active SKActions that are still running on the current scene seem to get aborted. For example, I have an action which animates the position of the camera which just stops at the point where the player hits the pause button (and presents the pause menu scene).


Is there a proper way to make it remember the status of and then later resume actions?


I've also considered the possibility that I'm displaying the sub-scene in an inappropriate way. Perhaps I should be creating a new SKView to display the sub-scene, therefore leaving the original scene alone? If so, how would I go about doing this? Everybody seems to be saying that a sub-scene should be presented via SKView.presentScene, like I am, but I can't see how to deal with these actions just being cancelled with no way of continuing them.

Replies

Hello,


You don't need another SKView to do this. In fact, by default your current actions should not be cancelled when you present another scene.


  1. When you present your temporary sub-scene, make sure you pause your current scene via 'isPaused'
  2. When you decide that you want to return to your original scene, unpause it before you present it. Or unpause it right after it is presented.