Centralized save manager events

Announcements, support questions, and discussion for Love/Hate.
User avatar
Tony Li
Posts: 22110
Joined: Thu Jul 18, 2013 1:27 pm

Re: Centralized save manager events

Post 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.
dkrusenstrahle
Posts: 39
Joined: Sat Apr 20, 2024 7:03 pm

Re: Centralized save manager events

Post 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!
User avatar
Tony Li
Posts: 22110
Joined: Thu Jul 18, 2013 1:27 pm

Re: Centralized save manager events

Post by Tony Li »

Thanks! Dialogue System assignments work similarly, btw: How To: Manage Player Controls and Scene Changes
dkrusenstrahle
Posts: 39
Joined: Sat Apr 20, 2024 7:03 pm

Re: Centralized save manager events

Post by dkrusenstrahle »

Bought now!
User avatar
Tony Li
Posts: 22110
Joined: Thu Jul 18, 2013 1:27 pm

Re: Centralized save manager events

Post by Tony Li »

Thank you!
Post Reply