Scene portal

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
qest43
Posts: 33
Joined: Thu May 26, 2022 9:22 am

Scene portal

Post by qest43 »

I have some questions, project is in 2D:

1. When I use scene portal and player is transited to another scene, he is basically reloaded and his facing direction is loaded again. I want to keep his facing direction from last scene, so if he use doors and goes <- left, he shouldnt be facing right when new scene is loading.

2. Does your plugin has any pause system too?

3. How can I load name of scene where my player was during the last save in game, from specific slot? It will be used to display this information os save slot in main menu.
User avatar
Tony Li
Posts: 21970
Joined: Thu Jul 18, 2013 1:27 pm

Re: Scene portal

Post by Tony Li »

Hi,
qest43 wrote: Fri Sep 09, 2022 3:31 pm1. When I use scene portal and player is transited to another scene, he is basically reloaded and his facing direction is loaded again. I want to keep his facing direction from last scene, so if he use doors and goes <- left, he shouldnt be facing right when new scene is loading.
If you use the transform's rotation for his facing direction, set the spawnpoint's rotation. The player will be moved to the spawnpoint's position and rotation.

If you set the player's SpriteRenderer.flipX value or otherwise handle the facing direction in your character controller's script, you can make a subclass of PositionSaver that overrides SetPosition().
qest43 wrote: Fri Sep 09, 2022 3:31 pm2. Does your plugin has any pause system too?
The Dialogue System Extras page has a free Menu Framework with a pause menu.
qest43 wrote: Fri Sep 09, 2022 3:31 pm3. How can I load name of scene where my player was during the last save in game, from specific slot? It will be used to display this information os save slot in main menu.
Please see: How To: Include Summary Info In Saved Games. After getting the saved game data, the scene name will be in savedGameData.sceneName.
Post Reply