Automatic toggle quest when questname focused
Posted: Sat Nov 12, 2022 3:37 pm
I also see there are groups on UI, with active and completed quests, but in game there are no groups showed, just quest list like above, is this correct?
Support and discussion forum for Pixel Crushers products
https://www.pixelcrushers.com:443/phpbb/
https://www.pixelcrushers.com:443/phpbb/viewtopic.php?t=6399
Inspect your Quest Journal UI's Unity UI Quest Journal UI component. Tick "Show Details On Focus".
Inspect your quest in the Quest Editor, and set the Group field of your quest's main info.
Code: Select all
NullReferenceException: Object reference not set to an instance of an object
PixelCrushers.QuestMachine.UnityUIQuestJournalUI.GetGroupNames (System.Collections.Generic.List`1[System.String]& groupNames, System.Int32& numGroupless) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest UIs/Unity UI/Unity UI Quest Journal UI/UnityUIQuestJournalUI.cs:444)
PixelCrushers.QuestMachine.UnityUIQuestJournalUI.RefreshNow () (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest UIs/Unity UI/Unity UI Quest Journal UI/UnityUIQuestJournalUI.cs:424)
PixelCrushers.QuestMachine.UnityUIQuestJournalUI+<RefreshAtEndOfFrame>d__147.MoveNext () (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest UIs/Unity UI/Unity UI Quest Journal UI/UnityUIQuestJournalUI.cs:412)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <c6b52566f59b49fc861a7812a1ea2f6b>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
Code: Select all
using PixelCrushers.QuestMachine;
using UnityEngine;
public class QuestJournalTab : MonoBehaviour
{
[SerializeField] private UnityUIQuestJournalUI unityUIQuestJournalUI;
private void Start() => QuestMachine.defaultQuestJournalUI = unityUIQuestJournalUI;
private void OnEnable() => unityUIQuestJournalUI.Repaint();
}
Please use this article to put the journal UI in a tab of your own UI: How To: Put Journal UI In Your Own Menu.qest43 wrote: ↑Sun Nov 13, 2022 1:00 pm1. I have an error. First I have Quest Machine on first scene, on second scene I have Quest Journal UI, and on third scene I have Player. When I open Quest Journal UI on third scene, this error pop ups:
Code: Select all
NullReferenceException: Object reference not set to an instance of an object...
You will have to use a custom subclass of UnityUIQuestJournalUI.
You can show active quests separately from completed quests, but for handwritten quests (i.e., quests made in the Quest Editor window), you can't easily change their groups.
By default, the quest journal UI uses Unity UI's Automatic navigation. Check the Navigation dropdowns on your Quest Group Template, Active Quest Name Template, and Completed Quest Name Template. Also compare it to the example Quest Journal UI that ships with Quest Machine. I just confirmed that navigation works correctly in the Demo. (I set the Knight's Quest Group to "Hunting" to make sure that there were two quest groups if I picked up the Villager's an Knight's quests.)