Page 2 of 2

Re: Journal Panel doesn't show up

Posted: Sun Feb 24, 2019 3:24 pm
by Tony Li
If the Quest Journal component's UI Settings > Quest Journal UI field is unassigned, it will automatically use the Quest Machine GameObject's QuestJournalUI.

Re: Journal Panel doesn't show up

Posted: Sun Feb 24, 2019 3:47 pm
by GorkaGames
Yes I know, Thanks, that's the reason I'm writing on this thread that we opened some months ago, but now my Quest Journal UI is inside my Main Menu and sometimes on the gameplay is not on any of the same scenes of Quest Journal and / or Quest Machine, so I lose both references. I need to find on the scene by code to be 100% sure that I'll find it.

Re: Journal Panel doesn't show up

Posted: Sun Feb 24, 2019 4:25 pm
by Tony Li
When you change scenes, set QuestMachine.defaultQuestJournalUI. Example:

Code: Select all

void Start()
{
    QuestMachine.defaultQuestJournalUI = FindObjectOfType<UnityUIQuestJournalUI>() as IQuestJournalUI;
}
Or you can make a subclass of QuestJournal and override ToggleJournalUI() to always find the journal UI first:

Code: Select all

public override void ToggleJournalUI()
{
    if (questJournalUI == null) questJournalUI = FindObjectOfType<UnityUIQuestJournalUI>() as IQuestJournalUI;
    base.ToggleJournalUI();
}

Re: Journal Panel doesn't show up

Posted: Sun Feb 24, 2019 6:09 pm
by GorkaGames
Thanks, first option didn't work for me but second one yes. Just one thing, it was this, wasn't it?

public override void ToggleJournalUI() instead of: public virtual void ToggleJournalUI()

Re: Journal Panel doesn't show up

Posted: Sun Feb 24, 2019 7:16 pm
by Tony Li
Yes, it should be "override". I'll fix that in the post right now.