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

Active Line Metadata#

Game Creator / Dialogue / Active Line Metadata

  • Can Read

  • Cannot Write

Description#

Returns the metadata value of the current active line of the Dialogue component

Note

The value of the metadata key must be '1' or 'true' to return true. Otherwise returns false

Code#

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

namespace GameCreator.Runtime.Dialogue
{
    [Get]

    [Title("Active Line Metadata")]
    [Category("Game Creator/Dialogue/Active Line Metadata")]

    [Description("Returns the metadata value of the current active line of the Dialogue component")]
    [Image(typeof(IconBubbleSolid), ColorTheme.Type.TextLight, typeof(BadgeHash))]

    [Note("The value of the metadata key must be '1' or 'true' to return true. Otherwise returns false")]

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

        [SerializeField] private GetString m_Metadata = new GetString("my-metadata");

        public override bool Get(Args args)
        {
            Dialogue dialogue = this.m_Dialogue.Get<Dialogue>(args);
            if (dialogue == null) return false;

            string metadata = this.m_Metadata.Get(args);
            return dialogue.CurrentNode != null &&
                   dialogue.CurrentNode.TryGetMetadata(metadata, out string value) &&
                   (value == "1" || value == "true");
        }

        public override string ToString()
        {
            return $"Active {this.m_Dialogue}[{this.m_Metadata}]";
        }

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