Can't get editor custom handles to actually move

I’ve been trying to add some basic handles to an object to adjust values in a script. I’ve looked into Handles.Slider(), Handles.ScaleSlider(), Handles.Slider2D() and I can’t actually get the handles to move. Even the most simple implementation. It will draw the initial handle just fine, and I can select the handles, but they don’t actually do anything when I try to drag/move them. Here is a super simple example:

using UnityEngine;
using UnityEditor;
using System.Collections;
 
[CustomEditor(typeof(Foo))]
public class FooEditor : Editor {
 
    public override void OnInspectorGUI ()
    {
       EditorGUIUtility.LookLikeInspector();
       base.OnInspectorGUI ();
    }
 
    public void OnSceneGUI()
    {
       Foo testObject = (Foo)target;
       Handles.color = Color.magenta;
       Vector3 vectorPoint = Handles.Slider( testObject.transform.position,  Vector3.left );
 
       if( GUI.changed )
         EditorUtility.SetDirty(testObject);
    }
}

I’m guessing there is something obvious I’m missing, but I can’t seem to figure it out. Thanks.

You need to put the value returned by Handles.Slider as the new value for testObject.transform.position ie

testObject.transform.position = Handles.Slider(testObject.transform.position, Vector3.left);


Thanks for the reply. What if I want the target object to be stationary, but I want the handle itself to get longer/shorter as you drag? Is there a way to achieve this?