Page 1 of 1

Problem with scene change

Posted: Tue Mar 05, 2024 8:19 am
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 331 times

Re: Problem with scene change

Posted: Tue Mar 05, 2024 9:43 am
by Tony Li
Hello,

Add an instance of the SceneFaderCanvas prefab:

sceneFaderCanvas.png
sceneFaderCanvas.png (83.04 KiB) Viewed 323 times

Re: Problem with scene change

Posted: Tue Mar 05, 2024 7:12 pm
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.

Re: Problem with scene change

Posted: Tue Mar 05, 2024 9:23 pm
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.

Re: Problem with scene change

Posted: Tue Mar 05, 2024 10:20 pm
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

Re: Problem with scene change

Posted: Tue Mar 05, 2024 10:30 pm
by Tony Li
It looks like it's a child of NagomiTown's Main > GamePlayCanvas:

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

Main > GamePlayCanvas will disappear when you leave the scene. So SaveaSystem will no longer have a valid Animator.

Re: Problem with scene change

Posted: Tue Mar 05, 2024 10:51 pm
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

Re: Problem with scene change

Posted: Wed Mar 06, 2024 8:27 am
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