Rigidbody Is Sleeping#
Physics 3D / Rigidbody / Rigidbody Is Sleeping
Can Read
Cannot Write
Description#
Returns the execution of Is Sleeping method on the Rigidbody 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]
[Title("Rigidbody Is Sleeping")]
[Category("Physics 3D/Rigidbody/Is Sleeping")]
[Description("Returns the execution of Is Sleeping method on the Rigidbody component")]
[Image(typeof(IconPhysics), ColorTheme.Type.Lime)]
[Keywords("Physics, 3D")]
[Serializable]
public class GenTypeBool_Rigidbody_IsSleeping_0 : TypeBool
{
[SerializeField] private GetGameObject m_Rigidbody = new GetGameObject(
new GenTypeGameObject_Rigidbody()
);
public override bool Get(Args args)
{
Rigidbody component = this.m_Rigidbody.Get<Rigidbody>(args);
if (component == null) return default;
bool value = (bool) component.IsSleeping();
return value;
}
public override string ToString()
{
return $"{this.m_Rigidbody} Is Sleeping";
}
protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
}
}