Version: 5.6
public bool wholeNumbers ;

説明

値に整数のみが使用できるようにするか。

using UnityEngine;
using System.Collections;
using UnityEngine.UI; // Required when Using UI elements.

public class Example : MonoBehaviour { public Slider mainSlider;

public void Start() { //sets the slider's value to accept whole numbers only. mainSlider.wholeNumbers = true; } }