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

Texture#

  • Can Read

  • Cannot Write

Description#

A constant Texture value

Code#

using System;
using UnityEngine;
using VisualScript.Icons;

namespace VisualScript.Runtime
{
    [Get]

    [Inline(nameof(m_Value), typeof(Texture), false)]

    [Title("Texture")]
    [Category("Texture")]

    [Description("A constant Texture value")]
    [Image(typeof(IconTexture), ColorTheme.Type.Blue)]

    [Keywords("Value", "Constant")]

    [Serializable]
    public class TypeTextureConstant : TypeTexture
    {
        [SerializeField] private Texture m_Value;

        public override Texture GetPreview(GameObject source) => this.m_Value;

        public TypeTextureConstant() : this(null)
        { }

        public TypeTextureConstant(Texture value)
        {
            this.m_Value = value;
        }

        public override Texture Get(Args args)
        {
            return this.m_Value;
        }

        public override string ToString()
        {
            return TextUtils.Name(this.m_Value);
        }

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