---
tags:
    - "Physics, 3D, Kinematic"
---

# Cloth Set Enabled Fading

[Physics 3D](../index.md) / [Cloth](index.md) / **Cloth Set Enabled Fading** Enabled, InterpolationTime

## Description

Executes the Set Enabled Fading method on the Cloth component

## Parameters

| Name | Description |
| :--- | :---------- |
| Enabled |  |
| Interpolation Time |  |

## 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;

namespace VisualScript.Runtime
{
    [Title("Cloth Set Enabled Fading")]
    [Category("Physics 3D/Cloth/Set Enabled Fading", "Enabled, InterpolationTime")]
    [Description("Executes the Set Enabled Fading method on the Cloth component")]
    
    [Image(typeof(IconShirt), ColorTheme.Type.Lime)]
    [Keywords("Physics, 3D, Kinematic")]
    
    [Parameter("Enabled")]
    [Parameter("Interpolation Time")]
    
    [Serializable]
    public class GenInstructionCloth_SetEnabledFading_2_BoolEnabled_FloatInterpolationTime : Instruction
    {
        [SerializeField] private GetGameObject m_Cloth = new GetGameObject(
            new GenTypeGameObject_Cloth()
        );
        
        [SerializeField] private GetBool m_Enabled = new GetBool();
        
        [SerializeField] private GetNumber m_InterpolationTime = new GetNumber();
        
        protected override string GetTitle(GameObject source)
        {
            string method = TextUtils.ThemeAsKeyword("Set Enabled Fading");
            return $"{this.m_Cloth} {method} ({this.m_Enabled}, {this.m_InterpolationTime})";
        }
        
        protected override Awaitable Run(Args args)
        {
            Cloth component = this.m_Cloth.Get<Cloth>(args);
            if (component == null) return Done;
            
            component.SetEnabledFading(
                (bool) this.m_Enabled.Get(args),
                (float) this.m_InterpolationTime.Get(args)
            );
            
            return Done;
        }
    }
}


```

