Set Cloth Enable Continuous Collision#
Physics 3D / Cloth / Set Cloth Enable Continuous Collision
Description#
Sets the Enable Continuous Collision property of Cloth component
Parameters#
| Name | Description |
|---|---|
| Cloth | |
| 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("Set Cloth Enable Continuous Collision")]
[Category("Physics 3D/Cloth/Enable Continuous Collision")]
[Description("Sets the Enable Continuous Collision property of Cloth component")]
[Image(typeof(IconShirt), ColorTheme.Type.Lime)]
[Keywords("Physics, 3D, Kinematic")]
[Parameter("Cloth")]
[Parameter("Value")]
[Serializable]
public class GenInstructionBool_Cloth_SetEnableContinuousCollision : Instruction
{
[SerializeField] private GetGameObject m_Cloth = new GetGameObject(
new GenTypeGameObject_Cloth()
);
[SerializeField] private GetBool m_Value = new GetBool();
protected override string GetTitle(GameObject source)
{
string member = TextUtils.ThemeAsKeyword("Enable Continuous Collision");
return $"{this.m_Cloth} {member} = {this.m_Value}";
}
protected override Awaitable Run(Args args)
{
Cloth component = this.m_Cloth.Get<Cloth>(args);
if (component == null) return Done;
component.enableContinuousCollision = (bool) this.m_Value.Get(args);
return Done;
}
}
}