I am working on an editor script and I want to put a slider in the middle of it, among other variables.
I would like to use EditorGUI.Slider but I have difficulties placing the slider properly.
Rect space = EditorGUILayout.BeginHorizontal(new GUILayoutOption[] {GUILayout.Height(50.0f)});
script.Val = EditorGUI.Slider(space, script.Val, 0, 100);
EditorGUILayout.EndHorizontal();
This will yield a slider but the slider doesn’t have the correct height (the height paramater is ignored), can’t be dragged (probably a separate issue). Unfortunately the Unity documnetation is not using the position parameter and it doesn’t seem to be optional.
Unity 4.6 Beta 19