Skinned Mesh Renderer Set Blend Shape Weight#
Mesh / Skinned Mesh Renderer / Skinned Mesh Renderer Set Blend Shape Weight
Description#
Executes the Set Blend Shape Weight method on the Skinned Mesh 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;
namespace VisualScript.Runtime
{
[Title("Skinned Mesh Renderer Set Blend Shape Weight")]
[Category("Mesh/Skinned Mesh Renderer/Set Blend Shape Weight")]
[Description("Executes the Set Blend Shape Weight method on the Skinned Mesh Renderer component")]
[Image(typeof(IconSkinMesh), ColorTheme.Type.Blue)]
[Parameter("Index")]
[Parameter("Value")]
[Serializable]
public class GenInstructionSkinnedMeshRenderer_SetBlendShapeWeight_2 : Instruction
{
[SerializeField] private GetGameObject m_SkinnedMeshRenderer = new GetGameObject(
new GenTypeGameObject_SkinnedMeshRenderer()
);
[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_SkinnedMeshRenderer} {method} ({this.m_Index}, {this.m_Value})";
}
protected override Awaitable Run(Args args)
{
SkinnedMeshRenderer component = this.m_SkinnedMeshRenderer.Get<SkinnedMeshRenderer>(args);
if (component == null) return Done;
component.SetBlendShapeWeight(
(int) this.m_Index.Get(args),
(float) this.m_Value.Get(args)
);
return Done;
}
}
}