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

Set Texture#

Set / Set Texture

Description#

Sets a Texture value

Parameters#

Name Description
Set Where the value is stored
Value The value to store

Code#

using System;
using UnityEngine;
using VisualScript.Icons;

namespace VisualScript.Runtime
{
    [Title("Set Texture")]
    [Image(typeof(IconTexture), ColorTheme.Type.Blue)]
    
    [Description("Sets a Texture value")]
    [Category("Set/Set Texture")]
    
    [Parameter("Set", "Where the value is stored")]
    [Parameter("Value", "The value to store")]
    
    [Keywords("Set", "Change", "Modify", "Assign")]
    
    [Serializable]
    public class InstructionCoreSetTexture : Instruction
    {
        [SerializeField] private SetTexture m_Set = new SetTexture();
        [SerializeField] private GetTexture m_Value = new GetTexture();

        protected override string GetTitle(GameObject source) => $"{this.m_Set} = {this.m_Value}";

        protected override Awaitable Run(Args args)
        {
            Texture value = this.m_Value.Get(args);
            this.m_Set.Set(value, args);
            
            return Done;
        }
    }
}
Visual Script logoVisual Script © Catsoft Works 2026. All rights reserved.