Page 1 of 1

Access Alert [SOLVED]

Posted: Sat Dec 28, 2019 12:52 pm
by mschoenhals
Hi,
Is it possible for other scripts to access the Alert HUD? How would I do that?

Re: Access Alert

Posted: Sat Dec 28, 2019 2:51 pm
by Tony Li
Hi,

In script, you can use QuestMachine.defaultQuestAlertUI.ShowAlert. There are 3 variations that allow you to show different types of content. The simplest is a text string:

Code: Select all

QuestMachine.defaultQuestAlertUI.ShowAlert("Hello world");
If you want to hook up a UnityEvent in the inspector, add a QuestControl component, and configure the event to call QuestControl.ShowAlert.

Re: Access Alert

Posted: Sun Dec 29, 2019 8:05 pm
by mschoenhals
This works perfectly!
Thank you. :D