Hello, I need to check if alert is shown not to overwrite its text, something like DialogueManager.isConversationActive for Alerts;
I found PixelCrushers.DialogueSystem.UnityUIDialogueUI.alertIsVisible() but it's protected
How to check if alert is shown?
Re: How to check if alert is shown?
You should ideally be using StandardDialogueUI, not the deprecated UnityUIDialogueUI. (In fact, DS version 2.2.12, which just released today, has removed the deprecated UnityUIDialogueUI prefabs to prevent confusion. They're still available on the Extras page.)
If you're using StandardDialogueUI, the Alert UI Elements section has a Queue Alerts checkbox:
If you show an alert while another alert is still visible, the second alert will wait until the first one is done. Then the second one will appear.
If that doesn't cover what you need, you can check the isVisible property:
If you're using StandardDialogueUI, the Alert UI Elements section has a Queue Alerts checkbox:
If you show an alert while another alert is still visible, the second alert will wait until the first one is done. Then the second one will appear.
If that doesn't cover what you need, you can check the isVisible property:
Code: Select all
if ((DialogueManager.dialogueUI as StandardDialogueUI).alertUIElements.isVisible)
{
Debug.Log("An alert is currently visible.");
}