How to open quest log with UI button.
How to open quest log with UI button.
I have added quest log window hotkey component. When I set a key the window will open but when I type my buttons name to "Button Name" it doesn't do anything. How can I open the quest window with my button?
Re: How to open quest log with UI button.
Hi,
Configure your UI button's OnClick() event to call the quest log window's Open() method.
Note: The quest log window is typically in the Dialogue Manager's hierarchy, so it survives scene changes. In this case, your UI button should also be in the Dialogue Manager's hierarchy or marked Don't Destroy On Load so it survives scene changes. If you don't want to do that, use FindObjectOfType<QuestLogWindow>().Open() to open the quest log window. Related explanation: How To: Manage Player Controls and Scene Changes
Configure your UI button's OnClick() event to call the quest log window's Open() method.
Note: The quest log window is typically in the Dialogue Manager's hierarchy, so it survives scene changes. In this case, your UI button should also be in the Dialogue Manager's hierarchy or marked Don't Destroy On Load so it survives scene changes. If you don't want to do that, use FindObjectOfType<QuestLogWindow>().Open() to open the quest log window. Related explanation: How To: Manage Player Controls and Scene Changes