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

Scroll Rect Inertia#

UI / Scroll / Scroll Rect / Scroll Rect Inertia

  • Can Read

  • Can Write

Description#

The Inertia property of the Scroll Rect 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;
using UnityEngine.UI;

namespace VisualScript.Runtime
{
    [Get]
    [Set]
    
    [Title("Scroll Rect Inertia")]
    [Category("UI/Scroll/Scroll Rect/Inertia")]
    [Description("The Inertia property of the Scroll Rect component")]
    
    [Image(typeof(IconScrollRect), ColorTheme.Type.TextLight)]
    [Keywords("UI, User, Interface")]
    
    [Serializable]
    public class GenTypeBool_ScrollRect_Inertia : TypeBool
    {
        [SerializeField] private GetGameObject m_ScrollRect = new GetGameObject(
            new GenTypeGameObject_ScrollRect()
        );
        
        public override bool GetPreview(GameObject source)
        {
            GameObject instance = this.m_ScrollRect.GetPreview(source);
            if (instance == null) return default;
            
            ScrollRect component = instance.GetComponent<ScrollRect>();
            return component != null ? component.inertia : default;
        }
        
        public override bool Get(Args args)
        {
            ScrollRect instance = this.m_ScrollRect.Get<ScrollRect>(args);
            return instance != null
                ? instance.inertia
                : default;
        }
        
        public override void Set(bool value, Args args)
        {
            ScrollRect component = this.m_ScrollRect.Get<ScrollRect>(args);
            if (component != null) component.inertia = (bool) value;
        }
        
        public override string ToString()
        {
            return $"{this.m_ScrollRect} Inertia";
        }
        
        protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
    }
}

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