I'm having a stab at making my own menu. I've got "New Game" button sorted with a fade out and fade in. It works fine. I've also got the "Quit" button sorted too. ( I'm just using "On Click ()" events for everything, I'm useless at coding).
My difficulty is with my "Load Last Save" button. I can load from slot okay but I want to fade out to black and then fade in to the loaded save to hide the abrupt transition via the Spawnpoint. Is there an existing script or something I can attach to a game object and call with the On Click () event? I'm sure that must be somewhere in the DS armory but I can't seem to find it.
Oh, seasons greetings to everyone
Load Save with fade out/fade in.
Re: Load Save with fade out/fade in.
Hi,
Add this prefab as a child of your Dialogue Manager:
Assets / Plugins / Pixel Crushers / Prefabs / Art / SceneFaderCanvas.
Then add a StandardSceneTransitionManager component to the Dialogue Manager, or whichever GameObject has your SaveSystem component. (Take a look at the Dialogue Manager in the Dialogue System's demo scenes for an example.)
Any time you change scenes using the Dialogue System, it will use the transitions you've configured on your StandardSceneTransitionManager. Examples of when the Dialogue System changes scenes are:
Add this prefab as a child of your Dialogue Manager:
Assets / Plugins / Pixel Crushers / Prefabs / Art / SceneFaderCanvas.
Then add a StandardSceneTransitionManager component to the Dialogue Manager, or whichever GameObject has your SaveSystem component. (Take a look at the Dialogue Manager in the Dialogue System's demo scenes for an example.)
Any time you change scenes using the Dialogue System, it will use the transitions you've configured on your StandardSceneTransitionManager. Examples of when the Dialogue System changes scenes are:
- Starting a new game by calling SaveSystemMethods.RestartGame (e.g., add SaveSystemMethods to a UI Button so you can configure the Button's OnClick() to call SaveSystemMethods.RestartGame).
- Loading a saved game by calling SaveSystemMethods.LoadFromSlot.
- Changing scenes using SaveSystemMethods.LoadScene or the LoadLevel() sequencer command or a ScenePortal component.
Re: Load Save with fade out/fade in.
Thank you, I've done all that and it sort of works. It fades OUT nicely but it doesn't fade IN the new scene or the loaded save. Ive set the SceneFaderCanvas as a child of Dialogue Manager and that looks okay.
Obviously I'm doing something wrong. But what?
I'll attach a screenshot of my setup in case you can see what I'm messing up.
Obviously I'm doing something wrong. But what?
I'll attach a screenshot of my setup in case you can see what I'm messing up.
- Attachments
-
- Fader Setup2.png (161.76 KiB) Viewed 676 times
Re: Load Save with fade out/fade in.
Hi,
Does your Dialogue Manager GameObject have the SaveSystem component, too? You're not doing anything to destroy the Dialogue Manager when the scene unloads, are you? Have you changed the animations or animator controller on the SceneFaderCanvas?
As a test, if you add the Dialogue System's DemoScene1 and DemoScene2 to build settings, play DemoScene1, and use the door on the left to go to DemoScene2, does it correctly fade out and back in?
Does your Dialogue Manager GameObject have the SaveSystem component, too? You're not doing anything to destroy the Dialogue Manager when the scene unloads, are you? Have you changed the animations or animator controller on the SceneFaderCanvas?
As a test, if you add the Dialogue System's DemoScene1 and DemoScene2 to build settings, play DemoScene1, and use the door on the left to go to DemoScene2, does it correctly fade out and back in?
Re: Load Save with fade out/fade in.
Yes, the Dialogue Manager has the SaveSystem component on it. No, to the other questions.
I tried the demo scenes and realised the fade in of the new scene is very subtle and doesn't stay long enough in the "black" to cover the ugly parts of the scene or save game loading sequence. So only then did I start messing about with the
SceneFaderCanvasAnimator. Cutting the story short I found that changing the speed on the Fade To Black node to 0.5 and the speed of the Fade From Black node to -3 gave me just what I wanted. (Just changing the duration numbers in the Standard Scene Transition Manager didn't seem to help me much - I left Show at 2 and 0 and left Hide at 0 and 0.)
Thank you for all the information. I'm now going to use the Portal Prefabs for scene changes and try to get transition scenes working, Once more, Thank you so much. This is a great asset.
Re: Load Save with fade out/fade in.
Glad to help!
If you're using the SaveSystemPrefabs package on the Extras page, I believe it has a different animator controller that works nicely in conjunction with loading screens. (After it fades to black and loads the loading screen, it hides the black cover so the player can see the loading screen. Then it shows the black cover again once the destination scene is loaded so it can fade back in nicely.)
If you're using the SaveSystemPrefabs package on the Extras page, I believe it has a different animator controller that works nicely in conjunction with loading screens. (After it fades to black and loads the loading screen, it hides the black cover so the player can see the loading screen. Then it shows the black cover again once the destination scene is loaded so it can fade back in nicely.)
Re: Load Save with fade out/fade in.
In case someone else tries this, I found it important to leave the "Pause During Transition" box UNchecked on the Standard Scene Transition Manager. In my case leaving it checked meant the LoadFromSlot function didn't complete - so no game was loaded. With the box unchecked it all worked as expected.
Re: Load Save with fade out/fade in.
Hmm, that shouldn't happen. If you want to investigate it in your project, let me know. Otherwise, if you're fine with leaving it unticked (which provides a smoother transition anyway since it doesn't pause everything as the transition manager fades out), we can drop it.