Page 2 of 2

Re: Centralized save manager events

Posted: Thu Apr 25, 2024 9:55 am
by Tony Li
Hi,

I recommend against that because it makes it hard for Quest Machine to retain some quest info across scene changes. And it's probably just skirting around the issue instead of addressing it. The issue is probably that you have assignments between GameObjects that exist only in a specific scene and GameObjects such as Quest Machine that survive scene changes. When you change scenes, these assignments will become invalid. For example, if you assign the Quest Machine GameObject's dialogue UI to a scene-specific player Quest Journal's Dialogue UI field, the Quest Journal's Dialogue UI assignment will be come invalid. You can either assign a quest dialogue UI that exists only in the same scene as the Quest Journal component and doesn't survive scene changes, or you can leave the Quest Journal component's Dialogue UI field unassigned in which case it will use the Quest Machine GameObject's dialogue UI by default without needing any assignment.

BTW, you can still have a Quest Machine GameObject in each scene. I recommend configuring a Quest Machine GameObject the way you want and then dragging it into the Project view to create a prefab variant. Then add instances of this prefab variant to whatever scenes you want. During play, when you change from one scene with a Quest Machine to another, the original Quest Machine GameObject will survive the scene change and replace the one in the new scene, allowing Quest Machine to retain information across scene changes.

Re: Centralized save manager events

Posted: Thu Apr 25, 2024 10:13 am
by dkrusenstrahle
This solved it!

The issue I had was I had split up the QuestManager object from the UI components :)
Now I have the UI components as child objects to the QuestManager and made it a prefab I add to each scene. Now everything works as a charm!

Brace yourself because in an hour I will buy Dialogue System for Unity haha!

Thank you Tony!

Re: Centralized save manager events

Posted: Thu Apr 25, 2024 11:00 am
by Tony Li
Thanks! Dialogue System assignments work similarly, btw: How To: Manage Player Controls and Scene Changes

Re: Centralized save manager events

Posted: Thu Apr 25, 2024 11:03 am
by dkrusenstrahle
Bought now!

Re: Centralized save manager events

Posted: Thu Apr 25, 2024 11:05 am
by Tony Li
Thank you!