GUILayout.HorizontalSliderstatic function HorizontalSlider (value : float, leftValue : float, rightValue : float, params options : GUILayoutOption[]) : floatstatic function HorizontalSlider (value : float, leftValue : float, rightValue : float, slider : GUIStyle, thumb : GUIStyle, params options : GUILayoutOption[]) : floatParameters
Returnsfloat - The value that has been set by the user. DescriptionA horizontal slider the user can drag to change a value between a min and a max.
JavaScripts
var hSliderValue : float = 0.0;
function OnGUI () { hSliderValue = GUILayout.HorizontalSlider (hSliderValue, 0.0, 10.0); GUILayout.Label("This text makes just space"); } using UnityEngine;
using System.Collections; public class example : MonoBehaviour { public float hSliderValue = 0.0F; void OnGUI() { hSliderValue = GUILayout.HorizontalSlider(hSliderValue, 0.0F, 10.0F); GUILayout.Label("This text makes just space"); } } import UnityEngine
import System.Collections class example(MonoBehaviour): public hSliderValue as single = 0.0F def OnGUI(): hSliderValue = GUILayout.HorizontalSlider(hSliderValue, 0.0F, 10.0F) GUILayout.Label('This text makes just space')
|

