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.
Visual Script logo Manual

Characters#

Strings / Characters

  • Can Read

  • Cannot Write

Description#

The collection made of every single character of a text, in order

Parameters#

Name Description
Text The text that is broken into characters

Code#

using System;
using System.Collections.Generic;
using UnityEngine;
using VisualScript.Icons;

namespace VisualScript.Runtime
{
    [Get]

    [Title("Characters")]
    [Category("Strings/Characters")]

    [Description("The collection made of every single character of a text, in order")]
    [Image(typeof(IconString), ColorTheme.Type.Yellow, typeof(BadgeString))]

    [Parameter("Text", "The text that is broken into characters")]

    [Keywords("String", "Letters", "Char", "Each", "Iterate", "Loop")]

    [Serializable]
    public class TypeCollectionStringCharacters : TTypeCollection<string>
    {
        // EXPOSED MEMBERS: -----------------------------------------------------------------------

        [SerializeField] private GetString m_Text = new GetString();

        // PUBLIC METHODS: ------------------------------------------------------------------------

        public override string ToString()
        {
            return $"Characters of {this.m_Text}";
        }

        // PROTECTED METHODS: ---------------------------------------------------------------------

        protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;

        protected override void OnCapture(Args args, List<string> items)
        {
            string text = this.m_Text.Get(args);
            if (string.IsNullOrEmpty(text)) return;

            foreach (char character in text)
            {
                items.Add(character.ToString());
            }
        }
    }
}
Visual Script logoVisual Script © Catsoft Works 2026. All rights reserved.