Problem with scene change

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
fuakda
Posts: 27
Joined: Fri Sep 01, 2023 12:32 am

Problem with scene change

Post by fuakda »

I think that objects with save systems are singletons that can withstand changes.
Reference is missing.
Do I need any settings?

It also suffers from the problem of many references being lost when going back to the A→B→A scene.

Sorry for asking so many questions.
スクリーンショット 2024-03-05 221328.png
スクリーンショット 2024-03-05 221328.png (172.68 KiB) Viewed 325 times
User avatar
Tony Li
Posts: 21678
Joined: Thu Jul 18, 2013 1:27 pm

Re: Problem with scene change

Post by Tony Li »

Hello,

Add an instance of the SceneFaderCanvas prefab:

sceneFaderCanvas.png
sceneFaderCanvas.png (83.04 KiB) Viewed 317 times
fuakda
Posts: 27
Joined: Fri Sep 01, 2023 12:32 am

Re: Problem with scene change

Post by fuakda »



I think I'm using the same settings, but the results are different.

I have set it to the same level as the UIS integration demo scene, but is it wrong to use the same settings as this demo in the first place?
sorry.
User avatar
Tony Li
Posts: 21678
Joined: Thu Jul 18, 2013 1:27 pm

Re: Problem with scene change

Post by Tony Li »

Hi,

Move the "Fade" GameObject to be a child of your Save System GameObject.

The Save System GameObject survives scene changes. In the current configuration, when you change scenes it will lose the reference to the "Fade" GameObject in the NagomiTown scene.
fuakda
Posts: 27
Joined: Fri Sep 01, 2023 12:32 am

Re: Problem with scene change

Post by fuakda »

It is on the same level as the dialog system demo scene.
Should the player be a child of the "Dialogue Manager", unlike the DEMO?

Image
Attachments
スクリーンショット 2024-03-06 121257.png
スクリーンショット 2024-03-06 121257.png (348.85 KiB) Viewed 291 times
User avatar
Tony Li
Posts: 21678
Joined: Thu Jul 18, 2013 1:27 pm

Re: Problem with scene change

Post by Tony Li »

It looks like it's a child of NagomiTown's Main > GamePlayCanvas:

fadeNotChildOfSaveSystem.png
fadeNotChildOfSaveSystem.png (315.81 KiB) Viewed 289 times

Main > GamePlayCanvas will disappear when you leave the scene. So SaveaSystem will no longer have a valid Animator.
fuakda
Posts: 27
Joined: Fri Sep 01, 2023 12:32 am

Re: Problem with scene change

Post by fuakda »

thank you. The fade issue has been resolved.
Is it necessary to move the player to the child of the "Dialogue Manager" to solve the problem of disconnecting the player from the UI?
I'm confused because it's different from the demo scene.

Image
Attachments
スクリーンショット 2024-03-06 125203.png
スクリーンショット 2024-03-06 125203.png (17.17 KiB) Viewed 285 times
User avatar
Tony Li
Posts: 21678
Joined: Thu Jul 18, 2013 1:27 pm

Re: Problem with scene change

Post by Tony Li »

Hi - You can keep them separate as long as you don't have direct connections between them. Please see:
How To: Manage Player Controls and Scene Changes
Post Reply