Permanent handles (when object is not selected)

Hey all,

I tried to make an editor extension which shows a transform handle even when the object isn’t selected.
Interestingly, this is easily done by using Handles.PositionHandle from inside a OnDrawGizmos method on a GameObject. But using this approach, the handles can’t beclicked or moved - they only show.

Is there a way to accomplish this? This would allow for things like the light handles being usable without clicking each light (which could, of course, visually clutter the scene).

I was digging through the internet to find solution for this, and here it is: in custom inspector, add handle-drawing function to SceneView.OnSceneGUIDelgate. Something like this:

    	private void OnScene(SceneView sceneview)
    		// draw handles
    	void OnEnable()
    	    SceneView.onSceneGUIDelegate -= OnScene;
            SceneView.onSceneGUIDelegate += OnScene;

Now OnScene method is called with each sceneGUI event, whether or not gameObject is selected, and Handles are enabled and movable.

btw - if handles don’t move in OnScene(SceneView), try simply calling OnSceneGUI() from OnScene(SceneView) (you still need OnScene, for this delegate passes SceneView as an argument).