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

Sprite Renderer Set Blend Shape Weight#

Rendering / Sprite Renderer / Sprite Renderer Set Blend Shape Weight

Description#

Executes the Set Blend Shape Weight method on the Sprite Renderer component

Parameters#

Name Description
Index
Value

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.Rendering;

namespace VisualScript.Runtime
{
    [Title("Sprite Renderer Set Blend Shape Weight")]
    [Category("Rendering/Sprite Renderer/Set Blend Shape Weight")]
    [Description("Executes the Set Blend Shape Weight method on the Sprite Renderer component")]
    
    [Image(typeof(IconSprite), ColorTheme.Type.Purple, typeof(BadgeEye))]
    
    [Parameter("Index")]
    [Parameter("Value")]
    
    [Serializable]
    public class GenInstructionSpriteRenderer_SetBlendShapeWeight_2 : Instruction
    {
        [SerializeField] private GetGameObject m_SpriteRenderer = new GetGameObject(
            new GenTypeGameObject_SpriteRenderer()
        );
        
        [SerializeField] private GetInteger m_Index = new GetInteger();
        
        [SerializeField] private GetNumber m_Value = new GetNumber();
        
        protected override string GetTitle(GameObject source)
        {
            string method = TextUtils.ThemeAsKeyword("Set Blend Shape Weight");
            return $"{this.m_SpriteRenderer} {method} ({this.m_Index}, {this.m_Value})";
        }
        
        protected override Awaitable Run(Args args)
        {
            SpriteRenderer component = this.m_SpriteRenderer.Get<SpriteRenderer>(args);
            if (component == null) return Done;
            
            component.SetBlendShapeWeight(
                (int) this.m_Index.Get(args),
                (float) this.m_Value.Get(args)
            );
            
            return Done;
        }
    }
}

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