Documentation index for AI agents (llms.txt) A Markdown version of every page is available: request the page's source under /docs/, follow the "alternate" link in this page's head, or start from /llms.txt.
Visual Script logo Manual

Articulation Body Sleep Threshold#

Physics 3D / Articulation Body / Articulation Body Sleep Threshold

  • Can Read

  • Can Write

Description#

The Sleep Threshold property of the Articulation Body 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("Articulation Body Sleep Threshold")]
    [Category("Physics 3D/Articulation Body/Sleep Threshold")]
    [Description("The Sleep Threshold property of the Articulation Body component")]
    
    [Image(typeof(IconPhysics), ColorTheme.Type.Lime, typeof(BadgeDot))]
    [Keywords("Physics, 3D")]
    
    [Serializable]
    public class GenTypeNumber_ArticulationBody_SleepThreshold : TypeNumber
    {
        [SerializeField] private GetGameObject m_ArticulationBody = new GetGameObject(
            new GenTypeGameObject_ArticulationBody()
        );
        
        public override double GetPreview(GameObject source)
        {
            GameObject instance = this.m_ArticulationBody.GetPreview(source);
            if (instance == null) return default;
            
            ArticulationBody component = instance.GetComponent<ArticulationBody>();
            return component != null ? component.sleepThreshold : default;
        }
        
        public override double Get(Args args)
        {
            ArticulationBody instance = this.m_ArticulationBody.Get<ArticulationBody>(args);
            return instance != null
                ? instance.sleepThreshold
                : default;
        }
        
        public override void Set(double value, Args args)
        {
            ArticulationBody component = this.m_ArticulationBody.Get<ArticulationBody>(args);
            if (component != null) component.sleepThreshold = (float) value;
        }
        
        public override string ToString()
        {
            return $"{this.m_ArticulationBody} Sleep Threshold";
        }
        
        protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
    }
}

Visual Script logoVisual Script © Catsoft Works 2026. All rights reserved.