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

Visual Effect Set Texture#

Effects / Visual Effect / Visual Effect Set Texture Name, T

Description#

Executes the Set Texture method on the Visual Effect component

Parameters#

Name Description
Name
T

Code#

// <auto-generated>
// This script was automatically generated using the Visual Script Transpiler.
// Do not modify. Changes to this file will be lost when updating the package.
// </auto-generated>

using System;
using UnityEngine;
using VisualScript.Icons;
using UnityEngine.VFX;

namespace VisualScript.Runtime
{
    [Title("Visual Effect Set Texture")]
    [Category("Effects/Visual Effect/Set Texture", "Name, T")]
    [Description("Executes the Set Texture method on the Visual Effect component")]
    
    [Image(typeof(IconVisualEffect), ColorTheme.Type.Yellow)]
    [Keywords("Effect")]
    
    [Parameter("Name")]
    [Parameter("T")]
    
    [Serializable]
    public class GenInstructionVisualEffect_SetTexture_2_StringName_TextureT : Instruction
    {
        [SerializeField] private GetGameObject m_VisualEffect = new GetGameObject(
            new GenTypeGameObject_VisualEffect()
        );
        
        [SerializeField] private GetString m_Name = new GetString();
        
        [SerializeField] private GetTexture m_T = new GetTexture();
        
        protected override string GetTitle(GameObject source)
        {
            string method = TextUtils.ThemeAsKeyword("Set Texture");
            return $"{this.m_VisualEffect} {method} ({this.m_Name}, {this.m_T})";
        }
        
        protected override Awaitable Run(Args args)
        {
            VisualEffect component = this.m_VisualEffect.Get<VisualEffect>(args);
            if (component == null) return Done;
            
            component.SetTexture(
                (string) this.m_Name.Get(args),
                (Texture) this.m_T.Get(args)
            );
            
            return Done;
        }
    }
}

Visual Script logoVisual Script © Catsoft Works 2026. All rights reserved.