Page 1 of 1

Quest Tracker HUD Coroutine error

Posted: Wed Jun 29, 2022 7:06 am
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.

Re: Quest Tracker HUD Coroutine error

Posted: Wed Jun 29, 2022 9:02 am
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?

Re: Quest Tracker HUD Coroutine error

Posted: Wed Jun 29, 2022 9:07 am
by gaelgamesdev
Using the quest log window is probably better, so I'll set that one up

Re: Quest Tracker HUD Coroutine error

Posted: Wed Jun 29, 2022 9:32 am
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().