How to open quest journal by script? (Solved, partly)
Posted: Tue Oct 08, 2019 3:06 pm
I suspect this is something very basic, but I can't really find it in the docs. How can I open the quest journal with a script?
I'm using rewired, and I imported the 3rd party support for it, so I have the "InputDeviceManagerRewired.cs" attached to a gameobject.
I have an action called "Quest Journal" which I can trigger, and from another script, I can detect that the keyboard shortcut for it works.
I also have the "Quest Input Device Manager" prefab. Here I wasn't sure what to do, but I added "Quest Journal" under "Key buttons to check", and in "On Use Keyboard" I added UnityUIQuestJournal.Show().
Yet nothing happens. If I can show it by code instead, I can just hook it up to another place where I read Rewired inputs. But do I need to make a reference or is there a static method I can use?
All this work, and then I finally tried making a reference to the questJournal in my player, and bind this to happen when the rewired input is pressed:
Is that the proper way to do it? Can I remove all of the other stuff? Since I will have support for joypads too, it would be interesting to know if I can still control it myself, or if I have any use of the "Quest Input Device Manager" prefab. Is it documented somewhere?
I'm using rewired, and I imported the 3rd party support for it, so I have the "InputDeviceManagerRewired.cs" attached to a gameobject.
I have an action called "Quest Journal" which I can trigger, and from another script, I can detect that the keyboard shortcut for it works.
I also have the "Quest Input Device Manager" prefab. Here I wasn't sure what to do, but I added "Quest Journal" under "Key buttons to check", and in "On Use Keyboard" I added UnityUIQuestJournal.Show().
Yet nothing happens. If I can show it by code instead, I can just hook it up to another place where I read Rewired inputs. But do I need to make a reference or is there a static method I can use?
All this work, and then I finally tried making a reference to the questJournal in my player, and bind this to happen when the rewired input is pressed:
Code: Select all
questJournal.questJournalUI.Show(questJournal);