Quest Tracker HUD Coroutine error

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
User avatar
gaelgamesdev
Posts: 16
Joined: Wed Jan 19, 2022 11:17 am

Quest Tracker HUD Coroutine error

Post by gaelgamesdev »

Hi Tony!

I am trying to use the Quest Tracker HUD prefab in my own menu, but I seem to be missing something .

This menu has an open/close functionality as well as submenus that get enabled/disabled with left-right navigation.

When the quest is active and I open the menu > go to Quest subpage, I can't see the HUD.

I keep getting this error:

Code: Select all

Coroutine couldn't be started because the the game object 'Quest Tracker HUD' is inactive!
UnityEngine.MonoBehaviour:StartCoroutine (System.Collections.IEnumerator)
PixelCrushers.DialogueSystem.StandardUIQuestTracker:UpdateTracker () (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/UI/Standard/Quest/StandardUIQuestTracker.cs:195)
The error seems to be happening here:

Code: Select all

public virtual void UpdateTracker()
{
   if (!isVisible) return;
   if (refreshCoroutine == null)
    {
        refreshCoroutine = StartCoroutine(RefreshAtEndOfFrame()); //Line 195
     }
}
If I put the Quest Tracker HUD prefab at the root of the canvas, it works well, but that's not how I want to use it, since I only want it to be visible in the quest submenu only.

Do I need to use another UI element with the Quest Tracker HUD? I can't find the documentation or tutorial to set this up correctly.

Thank you!

PS. I'm not using Quest Machine.
User avatar
Tony Li
Posts: 21977
Joined: Thu Jul 18, 2013 1:27 pm

Re: Quest Tracker HUD Coroutine error

Post by Tony Li »

Hi,

One way to solve this is to put the Standard UI Quest Tracker component on the root of the canvas -- or at least a child GameObject that stays active -- and point its fields (Container, Quest Track Template) to UI elements in your Quest subpage.

Also, on your Quest subpage, are you sure you want to use the quest tracker and not the quest log window?
User avatar
gaelgamesdev
Posts: 16
Joined: Wed Jan 19, 2022 11:17 am

Re: Quest Tracker HUD Coroutine error

Post by gaelgamesdev »

Using the quest log window is probably better, so I'll set that one up
User avatar
Tony Li
Posts: 21977
Joined: Thu Jul 18, 2013 1:27 pm

Re: Quest Tracker HUD Coroutine error

Post by Tony Li »

Sounds good. When you enable the Quest subpage, call the QuestLogWindow component's Open() method. when you disable the subpage, call Close().
Post Reply