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

Scriptable Objects#

Constant / Scriptable Objects

  • Can Read

  • Cannot Write

Description#

A collection made of the list of Scriptable Objects defined below

Parameters#

Name Description
Scriptable Objects The list of assets that make up the collection

Code#

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

namespace VisualScript.Runtime
{
    [Get]

    [Title("Scriptable Objects")]
    [Category("Constant/Scriptable Objects")]

    [Description("A collection made of the list of Scriptable Objects defined below")]
    [Image(typeof(IconCubeOutline), ColorTheme.Type.Blue, typeof(BadgeScriptableObject))]

    [Parameter("Scriptable Objects", "The list of assets that make up the collection")]

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

    [Serializable]
    public class TypeCollectionScriptableObjectsList : TypeCollectionScriptableObjects
    {
        // EXPOSED MEMBERS: -----------------------------------------------------------------------

        [SerializeField] private List<ScriptableObject> m_ScriptableObjects = new List<ScriptableObject>();

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

        public override void Get(Args args, List<ScriptableObject> values)
        {
            values.Clear();
            values.AddRange(this.m_ScriptableObjects);
        }

        public override string ToString()
        {
            return $"Scriptable Objects ({this.m_ScriptableObjects.Count})";
        }

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

        protected override SubscriptionMode Subscription => SubscriptionMode.OnEditorChange;
    }
}
Visual Script logoVisual Script © Catsoft Works 2026. All rights reserved.