Documentation index for AI agents (llms.txt) A Markdown version of every page is available: request the page's source under /docs/, follow the "alternate" link in this page's head, or start from /llms.txt.
Game Creator 3 logo Dialogue

Stop Dialogue#

Game Creator / Dialogue / Stop Dialogue

Description#

Stops playing a Dialogue component

Note

Signals the Dialogue component to stop playing. The effect might be delayed by 1 frame

Parameters#

Name Description
Dialogue The Dialogue to stop

Code#

using System;
using UnityEngine;
using VisualScript.Icons;
using VisualScript.Runtime;

namespace GameCreator.Runtime.Dialogue
{
    [Title("Stop Dialogue")]
    [Image(typeof(IconDialogue), ColorTheme.Type.Blue, typeof(BadgeCross))]

    [Description("Stops playing a Dialogue component")]
    [Category("Game Creator/Dialogue/Stop Dialogue")]

    [Parameter("Dialogue", "The Dialogue to stop")]
    [Keywords("Dialogue", "Script", "Cancel", "End", "Finish")]

    [Note("Signals the Dialogue component to stop playing. The effect might be delayed by 1 frame")]

    [Serializable]
    public class InstructionDialogueStop : Instruction
    {
        [SerializeField] private GetGameObject m_Dialogue = new GetGameObject(
            new TypeGameObjectDialogue()
        );

        protected override string GetTitle(GameObject source) => $"Stop {this.m_Dialogue}";

        protected override Awaitable Run(Args args)
        {
            Dialogue dialogue = this.m_Dialogue.Get<Dialogue>(args);
            if (dialogue != null) dialogue.Cancel();

            return Done;
        }
    }
}
Game Creator 3 logoGame Creator 3 © Catsoft Works 2026. All rights reserved.