Set Character Controller Enable Overlap Recovery#
Physics 3D / Collider / Character Controller / Set Character Controller Enable Overlap Recovery
Description#
Sets the Enable Overlap Recovery property of Character Controller component
Parameters#
| Name | Description |
|---|---|
| Character Controller | |
| 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 Character Controller Enable Overlap Recovery")]
[Category("Physics 3D/Collider/Character Controller/Enable Overlap Recovery")]
[Description("Sets the Enable Overlap Recovery property of Character Controller component")]
[Image(typeof(IconCapsuleSolid), ColorTheme.Type.Lime, typeof(BadgeCharacter))]
[Keywords("Physics, 3D, Kinematic")]
[Parameter("Character Controller")]
[Parameter("Value")]
[Serializable]
public class GenInstructionBool_CharacterController_SetEnableOverlapRecovery : Instruction
{
[SerializeField] private GetGameObject m_CharacterController = new GetGameObject(
new GenTypeGameObject_CharacterController()
);
[SerializeField] private GetBool m_Value = new GetBool();
protected override string GetTitle(GameObject source)
{
string member = TextUtils.ThemeAsKeyword("Enable Overlap Recovery");
return $"{this.m_CharacterController} {member} = {this.m_Value}";
}
protected override Awaitable Run(Args args)
{
CharacterController component = this.m_CharacterController.Get<CharacterController>(args);
if (component == null) return Done;
component.enableOverlapRecovery = (bool) this.m_Value.Get(args);
return Done;
}
}
}