[HOWTO] Hide All Barks When Conversation Starts

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
User avatar
Tony Li
Posts: 20705
Joined: Thu Jul 18, 2013 1:27 pm

[HOWTO] Hide All Barks When Conversation Starts

Post by Tony Li »

To hide all barks when a conversation, add Bark Group Member components to your barkers, and tick Hide Bark On Conversation Start. (This checkbox was added in version 2.2.26.)

If you can't use that for some reason, you can add a script to the Dialogue Manager that finds all bark UIs and hides them:

HideBarksOnConversationStart.cs

Code: Select all

using UnityEngine;
using PixelCrushers.DialogueSystem;
public class HideBarksOnConversationStart : MonoBehaviour
{
    void OnConversationStart(Transform actor)
    {
        foreach (var barkUI in FindObjectsOfType<AbstractBarkUI>())
        {
            if (barkUI.isPlaying) barkUI.Hide();
        }
    }
}
Post Reply