At the start of every conversation I hide the non-conversation UI. For my custom UI I do this by adding an OnExecute Scene Event to the first node in the conversation (which triggers GameObject.SetActive)
Since the Quest HUD is defined on Dialogue Manager as a prefab not an instance, I can't do this. So how can I hide it when a conversation is active?
Hide Quest HUD on Conversation start
Re: Hide Quest HUD on Conversation start
Hi,
You don't need to add an OnExecute() scene event to every conversation. You can either add a Dialogue System Events component to the Dialogue Manager and/or player and use the OnConversationStart()/OnConversationEnd() events, or add a script with OnConversationStart(Transform) & OnConversationEnd(Transform) script methods.
To access the quest tracker HUD, you can add an instance of the quest tracker HUD to the Dialogue Manager and remove it from the Instantiate Prefabs component, or if you're using a script you can get it and hide it at runtime like:
You don't need to add an OnExecute() scene event to every conversation. You can either add a Dialogue System Events component to the Dialogue Manager and/or player and use the OnConversationStart()/OnConversationEnd() events, or add a script with OnConversationStart(Transform) & OnConversationEnd(Transform) script methods.
To access the quest tracker HUD, you can add an instance of the quest tracker HUD to the Dialogue Manager and remove it from the Instantiate Prefabs component, or if you're using a script you can get it and hide it at runtime like:
Code: Select all
void OnConversationStart(Transform actor)
{
DialogueManager.instance.GetComponentInChildren<StandardUIQuestTracker>().HideTracker();
}
Re: Hide Quest HUD on Conversation start
Thanks! worked perfectly and much easier than having boilerplate in every conversation
Re: Hide Quest HUD on Conversation start
Glad to help!