GUILayout.VerticalSliderstatic function VerticalSlider (value : float, leftValue : float, rightValue : float, params options : GUILayoutOption[]) : floatstatic function VerticalSlider (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 vertical slider the user can drag to change a value between a min and a max.
JavaScripts
// Draws a vertical slider control that goes from 10 (top) to 0 (bottom)
var vSliderValue : float = 0.0; function OnGUI () { vSliderValue = GUILayout.VerticalSlider (vSliderValue, 10.0, 0.0); } using UnityEngine;
using System.Collections; public class example : MonoBehaviour { public float vSliderValue = 0.0F; void OnGUI() { vSliderValue = GUILayout.VerticalSlider(vSliderValue, 10.0F, 0.0F); } } import UnityEngine
import System.Collections class example(MonoBehaviour): public vSliderValue as single = 0.0F def OnGUI(): vSliderValue = GUILayout.VerticalSlider(vSliderValue, 10.0F, 0.0F) |

