Character Controller Enable Overlap Recovery#
Physics 3D / Collider / Character Controller / Character Controller Enable Overlap Recovery
Can Read
Can Write
Description#
The Enable Overlap Recovery property of the Character Controller component
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
{
[Get]
[Set]
[Title("Character Controller Enable Overlap Recovery")]
[Category("Physics 3D/Collider/Character Controller/Enable Overlap Recovery")]
[Description("The Enable Overlap Recovery property of the Character Controller component")]
[Image(typeof(IconCapsuleSolid), ColorTheme.Type.Lime, typeof(BadgeCharacter))]
[Keywords("Physics, 3D, Kinematic")]
[Serializable]
public class GenTypeBool_CharacterController_EnableOverlapRecovery : TypeBool
{
[SerializeField] private GetGameObject m_CharacterController = new GetGameObject(
new GenTypeGameObject_CharacterController()
);
public override bool GetPreview(GameObject source)
{
GameObject instance = this.m_CharacterController.GetPreview(source);
if (instance == null) return default;
CharacterController component = instance.GetComponent<CharacterController>();
return component != null ? component.enableOverlapRecovery : default;
}
public override bool Get(Args args)
{
CharacterController instance = this.m_CharacterController.Get<CharacterController>(args);
return instance != null
? instance.enableOverlapRecovery
: default;
}
public override void Set(bool value, Args args)
{
CharacterController component = this.m_CharacterController.Get<CharacterController>(args);
if (component != null) component.enableOverlapRecovery = (bool) value;
}
public override string ToString()
{
return $"{this.m_CharacterController} Enable Overlap Recovery";
}
protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
}
}