public override void OnToolGUI(EditorWindow window)
{
var view = window as SceneView;
if (!view || !Selection.activeTransform || Tools.s_Hidden)
{
return;
}
if (!StageUtility.IsGameObjectRenderedByCamera(Selection.activeTransform.gameObject, Camera.current))
{
return;
}
bool isStatic = (!Tools.s_Hidden && EditorApplication.isPlaying && GameObjectUtility.ContainsStatic(Selection.gameObjects));
using (new EditorGUI.DisabledScope(isStatic))
{
Vector3 handlePosition = Tools.handlePosition;
ToolGUI(view, handlePosition, isStatic);
Handles.ShowStaticLabelIfNeeded(handlePosition);
}
}