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

Set Slider Whole Numbers#

UI / Interaction / Slider / Set Slider Whole Numbers

Description#

Sets the Whole Numbers property of Slider component

Parameters#

Name Description
Slider
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;
using UnityEngine.UI;

namespace VisualScript.Runtime
{
    [Title("Set Slider Whole Numbers")]
    [Category("UI/Interaction/Slider/Whole Numbers")]
    [Description("Sets the Whole Numbers property of Slider component")]
    
    [Image(typeof(IconUISlider), ColorTheme.Type.TextLight)]
    [Keywords("UI, User, Interface")]
    
    [Parameter("Slider")]
    [Parameter("Value")]
    
    [Serializable]
    public class GenInstructionBool_Slider_SetWholeNumbers : Instruction
    {
        [SerializeField] private GetGameObject m_Slider = new GetGameObject(
            new GenTypeGameObject_Slider()
        );
        
        [SerializeField] private GetBool m_Value = new GetBool();
        
        protected override string GetTitle(GameObject source)
        {
            string member = TextUtils.ThemeAsKeyword("Whole Numbers");
            return $"{this.m_Slider} {member} = {this.m_Value}";
        }
        
        protected override Awaitable Run(Args args)
        {
            Slider component = this.m_Slider.Get<Slider>(args);
            if (component == null) return Done;
            
            component.wholeNumbers = (bool) this.m_Value.Get(args);
            
            return Done;
        }
    }
}

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