Page 1 of 1

Showing the journal

Posted: Fri Oct 23, 2020 11:00 am
by Ollymuk
Hi

This is a really dumb question but where do you set the key to open the journal?

The manual says that the demo is configured to use "joystick back", but it doesn't appear to go on to say where I can change that.

I'd like to map it to a key on the keyboard, and I've gone through the JournalUI settings, and had a rummage in the unity input profile, but I can't see an obvious entry there for it.

Olly

Re: Showing the journal

Posted: Fri Oct 23, 2020 11:29 am
by Tony Li
Hi Olly,

The Demo's Gameplay Canvas > Journal Button has three components:
  • Quest Journal Button: Provides methods to show, hide, and toggle the quest journal.
  • (Unity UI) Button: Calls the Quest Journal Button component's ToggleJournalUI method.
  • UI Button Key Trigger: Maps a hotkey to the Button. On this button, it maps the "J" key and the joystick back button.
You can set up your own scene(s) similarly, or you can simply QuestJournal.ToggleJournalUI() in script. Example:

Code: Select all

if (Input.GetButtonDown("Toggle Journal")) // Assumes you've defined an input button with this name.
{
    QuestMachine.GetQuestJournal().ToggleJournalUI();
}

Re: Showing the journal

Posted: Fri Oct 23, 2020 12:49 pm
by Ollymuk
Thanks.

So many new canvas layers and prefabs to get used to. Also learning DS at the same time.

I don't use UI buttons for the inventory here, all key press or controller button press so will use code in my controller script.

Thanks

Olly

Re: Showing the journal

Posted: Fri Oct 23, 2020 1:04 pm
by Tony Li
Glad to help! If any DS + QM integration questions come up, just ask.