# Active Line Metadata

Game Creator / Dialogue / **Active Line Metadata**

<div class="grid cards" markdown>

* :green_circle: Can Read

* :red_circle: Cannot Write

</div>

## Description

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

## Code

```cs
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))]

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

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

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

            string metadata = this.m_Metadata.Get(args);
            return dialogue.CurrentNode?.GetMetadata(metadata);
        }

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

        protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
    }
}
```

