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 Get Blend Shape Weight#

Rendering / Sprite Renderer / Sprite Renderer Get Blend Shape Weight

  • Can Read

  • Cannot Write

Description#

Returns the execution of Get Blend Shape Weight method on the Sprite Renderer component

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
{
    [Get]
    
    [Title("Sprite Renderer Get Blend Shape Weight")]
    [Category("Rendering/Sprite Renderer/Get Blend Shape Weight")]
    [Description("Returns the execution of Get Blend Shape Weight method on the Sprite Renderer component")]
    
    [Image(typeof(IconSprite), ColorTheme.Type.Purple, typeof(BadgeEye))]
    
    [Serializable]
    public class GenTypeNumber_SpriteRenderer_GetBlendShapeWeight_1 : TypeNumber
    {
        [SerializeField] private GetGameObject m_SpriteRenderer = new GetGameObject(
            new GenTypeGameObject_SpriteRenderer()
        );
        
        [SerializeField] private GetInteger m_Index = new GetInteger();
        
        public override double Get(Args args)
        {
            SpriteRenderer component = this.m_SpriteRenderer.Get<SpriteRenderer>(args);
            if (component == null) return default;
            
            double value = (double) component.GetBlendShapeWeight(
                (int) this.m_Index.Get(args)
            );
            
            return value;
        }
        
        public override string ToString()
        {
            return $"{this.m_SpriteRenderer} Get Blend Shape Weight ({this.m_Index})";
        }
        
        protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
    }
}

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