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

Last Dialogue Started#

Game Creator / Dialogue / Last Dialogue Started

  • Can Read

  • Cannot Write

Description#

The last Dialogue component that started playing

Code#

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

namespace GameCreator.Runtime.Dialogue
{
    [Get]

    [Title("Last Dialogue Started")]
    [Category("Game Creator/Dialogue/Last Dialogue Started")]
    [Description("The last Dialogue component that started playing")]

    [Image(typeof(IconDialogue), ColorTheme.Type.Blue, typeof(BadgeArrowRight))]
    [Keywords("Script", "Narration", "Text", "Conversation", "Story", "Lines", "Dialogue")]
    [Keywords("Current")]

    [Serializable]
    public class TypeGameObjectLastDialogueStarted : TypeGameObject
    {
        public override GameObject Get(Args args)
        {
            return Dialogue.LastStarted != null ? Dialogue.LastStarted.gameObject : null;
        }

        public override U Get<U>(Args args)
        {
            if (typeof(U) == typeof(Dialogue))
            {
                return Dialogue.LastStarted != null
                    ? Dialogue.LastStarted as U
                    : null;
            }

            return base.Get<U>(args);
        }

        public override string ToString()
        {
            return "Last Dialogue Started";
        }

        protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
    }
}
Game Creator 3 logoGame Creator 3 © Catsoft Works 2026. All rights reserved.