Handles.ScaleSliderstatic function ScaleSlider (scale : float, position : Vector3, direction : Vector3, rotation : Quaternion, size : float, snap : float) : floatParameters
DescriptionMake a directional scale slider
// Increase/decrease a value just by moving the Scale slider Handle @CustomEditor (FreeScale) class FreeScaleHandleJS extends Editor { function OnSceneGUI () { target.val = Handles.ScaleSlider(target.val, target.transform.position, Vector3.up, Quaternion.identity, 5, HandleUtility.GetHandleSize(target.transform.position)); if (GUI.changed) EditorUtility.SetDirty (target); } } And the script attached to this handle: // FreeScale.js @script ExecuteInEditMode() var val : float = 1; function Update () { Debug.Log("Value tied to the slider: " + val); }
|

