---
tags:
    - "Effect"
---

# Visual Effect Set Skinned Mesh Renderer

[Effects](../index.md) / [Visual Effect](index.md) / **Visual Effect Set Skinned Mesh Renderer** NameID, M

## Description

Executes the Set Skinned Mesh Renderer method on the Visual Effect component

## Parameters

| Name | Description |
| :--- | :---------- |
| Name ID |  |
| M |  |

## Code

```cs
// <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 Skinned Mesh Renderer")]
    [Category("Effects/Visual Effect/Set Skinned Mesh Renderer", "NameID, M")]
    [Description("Executes the Set Skinned Mesh Renderer method on the Visual Effect component")]
    
    [Image(typeof(IconVisualEffect), ColorTheme.Type.Yellow)]
    [Keywords("Effect")]
    
    [Parameter("Name ID")]
    [Parameter("M")]
    
    [Serializable]
    public class GenInstructionVisualEffect_SetSkinnedMeshRenderer_2_IntNameID_SkinnedMeshRendererM : Instruction
    {
        [SerializeField] private GetGameObject m_VisualEffect = new GetGameObject(
            new GenTypeGameObject_VisualEffect()
        );
        
        [SerializeField] private GetInteger m_NameID = new GetInteger();
        
        [SerializeField] private GetGameObject m_M = new GetGameObject();
        
        protected override string GetTitle(GameObject source)
        {
            string method = TextUtils.ThemeAsKeyword("Set Skinned Mesh Renderer");
            return $"{this.m_VisualEffect} {method} ({this.m_NameID}, {this.m_M})";
        }
        
        protected override Awaitable Run(Args args)
        {
            VisualEffect component = this.m_VisualEffect.Get<VisualEffect>(args);
            if (component == null) return Done;
            
            component.SetSkinnedMeshRenderer(
                (int) this.m_NameID.Get(args),
                (SkinnedMeshRenderer) this.m_M.Get<SkinnedMeshRenderer>(args)
            );
            
            return Done;
        }
    }
}


```

