---
tags:
    - "UI, User, Interface"
---

# Slider Whole Numbers

[UI](../../index.md) / [Interaction](../index.md) / [Slider](index.md) / **Slider Whole Numbers**

## Description

Compares the Whole Numbers property of Slider component to another value

## Parameters

| Name | Description |
| :--- | :---------- |
| Slider |  |

## Code

```cs
// <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("Slider Whole Numbers")]
    [Category("UI/Interaction/Slider/Whole Numbers")]
    [Description("Compares the Whole Numbers property of Slider component to another value")]
    
    [Image(typeof(IconUISlider), ColorTheme.Type.TextLight)]
    [Keywords("UI, User, Interface")]
    
    [Parameter("Slider")]
    
    [Serializable]
    public class GenConditionBool_Slider_CheckWholeNumbers : Condition
    {
        [SerializeField] private GetGameObject m_Slider = new GetGameObject(
            new GenTypeGameObject_Slider()
        );
        
        protected override string GetTitle(GameObject source)
        {
            string member = TextUtils.ThemeAsKeyword("Whole Numbers");
            return $"{this.m_Slider} {member}";
        }
        
        protected override bool Run(Args args)
        {
            Slider component = this.m_Slider.Get<Slider>(args);
            if (component == null) return false;
            
            return component.wholeNumbers;
        }
    }
}


```

