---
tags:
    - "String"
    - "List"
    - "Array"
    - "Constant"
    - "Values"
    - "Set"
---

# Texts

[Strings](index.md) / **Texts**

<div class="grid cards" markdown>

* :green_circle: Can Read

* :red_circle: Cannot Write

</div>

## Description

A collection made of the list of texts defined below

## Parameters

| Name | Description |
| :--- | :---------- |
| Texts | The list of values that make up the collection |

## Code

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

namespace VisualScript.Runtime
{
    [Get]

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

    [Description("A collection made of the list of texts defined below")]
    [Image(typeof(IconString), ColorTheme.Type.Yellow, typeof(BadgeList))]

    [Parameter("Texts", "The list of values that make up the collection")]

    [Keywords("String", "List", "Array", "Constant", "Values", "Set")]

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

        [SerializeField] private List<GetString> m_Texts = new List<GetString>();

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

        public override string ToString()
        {
            return $"Texts ({this.m_Texts.Count})";
        }

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

        protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;

        protected override void OnCapture(Args args, List<string> items)
        {
            foreach (GetString text in this.m_Texts)
            {
                items.Add(text?.Get(args) ?? string.Empty);
            }
        }
    }
}

```

