[HOWTO] How To: Put Journal UI In Your Own Menu
Posted: Tue May 03, 2022 8:04 pm
The Quest Machine prefab has a Canvas with some starter UIs for dialogue, journal, HUD, and alerts. You can use them as-is and customize them as children of the Quest Machine GameObject's Canvas. You can also move any of the UIs to their own canvases. If you do this, it works best if that canvas's GameObject hierarchy is also set to Don't Destroy On Load since the Quest Machine GameObject is Don't Destroy On Load.
To move the journal UI to another canvas and control its visibility yourself:
1. On the Quest Machine GameObject's Quest Machine Configuration component, untick Hide Journal UI On Start.
2. Move the Quest Journal UI to whatever canvas you want. Remove the Animator component. On the UI Panel component, clear the Show Animation Trigger and Hide Animation Trigger fields. Set Start State to Open. Untick Deactivate On Hidden. Make sure the journal UI is assigned to the Quest Machine Configuration component's Default Journal UI field or to your player Quest Journal's Journal UI field.
3. When you want to manually update the contents of the journal UI, call its Repaint(QuestJournal) method, or call the Quest Journal component's ShowJournalUI() method.
To move the journal UI to another canvas and control its visibility yourself:
1. On the Quest Machine GameObject's Quest Machine Configuration component, untick Hide Journal UI On Start.
2. Move the Quest Journal UI to whatever canvas you want. Remove the Animator component. On the UI Panel component, clear the Show Animation Trigger and Hide Animation Trigger fields. Set Start State to Open. Untick Deactivate On Hidden. Make sure the journal UI is assigned to the Quest Machine Configuration component's Default Journal UI field or to your player Quest Journal's Journal UI field.
3. When you want to manually update the contents of the journal UI, call its Repaint(QuestJournal) method, or call the Quest Journal component's ShowJournalUI() method.