本文整理汇总了C#中UnityEditor.SceneView.Focus方法的典型用法代码示例。如果您正苦于以下问题:C# SceneView.Focus方法的具体用法?C# SceneView.Focus怎么用?C# SceneView.Focus使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UnityEditor.SceneView
的用法示例。
在下文中一共展示了SceneView.Focus方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: HandleMouseDown
private static void HandleMouseDown(SceneView view, int id, int button)
{
SceneViewMotion.s_Dragged = false;
if (!Tools.viewToolActive)
return;
ViewTool viewTool = Tools.viewTool;
if (Tools.s_LockedViewTool == viewTool)
return;
Event current = Event.current;
GUIUtility.hotControl = id;
Tools.s_LockedViewTool = viewTool;
SceneViewMotion.s_StartZoom = view.size;
SceneViewMotion.s_ZoomSpeed = Mathf.Max(Mathf.Abs(SceneViewMotion.s_StartZoom), 0.3f);
SceneViewMotion.s_TotalMotion = 0.0f;
if ((bool) ((Object) view))
view.Focus();
if ((bool) ((Object) Toolbar.get))
Toolbar.get.Repaint();
EditorGUIUtility.SetWantsMouseJumping(1);
current.Use();
GUIUtility.ExitGUI();
}
示例2: HandleMouseDown
private static void HandleMouseDown(SceneView view, int id, int button)
{
s_Dragged = false;
if (Tools.viewToolActive)
{
ViewTool viewTool = Tools.viewTool;
if (Tools.s_LockedViewTool != viewTool)
{
Event current = Event.current;
GUIUtility.hotControl = id;
Tools.s_LockedViewTool = viewTool;
s_StartZoom = view.size;
s_ZoomSpeed = Mathf.Max(Mathf.Abs(s_StartZoom), 0.3f);
s_TotalMotion = 0f;
if (view != null)
{
view.Focus();
}
if (Toolbar.get != null)
{
Toolbar.get.Repaint();
}
EditorGUIUtility.SetWantsMouseJumping(1);
current.Use();
GUIUtility.ExitGUI();
}
}
}