- Home /
Question by
RowDaBoat · Jan 13, 2012 at 01:21 AM ·
editorwindowgizmoshandleseditorscript
Draw Gizmos and Handles in the scene from an EditorWindow
Is there any way to draw gizmos and handles in the scene from an editor window without adding an auxiliar GameObject to the scene? I have tried
void OnGUI()
{
Gizmos.DrawCube(Vector3.zero, new Vector3(1, 1, 1));
}
and
SceneView.onSceneGUIDelegate += window.OnSceneGUI
public void OnSceneGUI(SceneView scnView)
{
Gizmos.DrawCube(Vector3.zero, new Vector3(1, 1, 1);
}
but both of course draw to the window instead of the scene.
Comment
Answer by wa1bo · Jul 02, 2013 at 09:57 AM
After drawing all your handles, just call:
HandleUtility.Repaint();