コード例 #1
0
        public void OpenHierarchy(ToolControl control)
        {
            activatorControl = control;
            var activatorPosition = activatorControl.activatorScreenPosition;

            activatorPosition.width = 300;
            PopupWatcher.Release(window);
            window = HierarchyPopup.Show(targets, activatorPosition);
            PopupWatcher.Watch(window);
        }
コード例 #2
0
        internal static void OnSceneGUI(SceneView sceneView)
        {
            if (PeekPlugin.Configuration.sceneHierarchyShortcut.Check(e))
            {
                var width = Mathf.Min(sceneView.position.width * 0.9f, 400);

                var activator = new Rect
                                (
                    (sceneView.position.width - width) / 2,
                    -1,
                    width,
                    0
                                );

                activator = LudiqGUIUtility.GUIToScreenRect(activator);

                HierarchyPopup.Show(activator);
                e.Use();
            }
        }
コード例 #3
0
        internal static void OnSceneGUI(SceneView sceneView)
        {
            if (e.type == EventType.KeyDown &&
                (
                    (PeekPlugin.Configuration.enableHierarchySpaceShortcut && e.modifiers == EventModifiers.None && e.keyCode == KeyCode.Space) ||
                    (PeekPlugin.Configuration.enableHierarchyFindShortcut && e.CtrlOrCmd() && e.keyCode == KeyCode.F && !e.shift && !e.alt)))
            {
                var width = Mathf.Min(sceneView.position.width * 0.9f, 400);

                var activator = new Rect
                                (
                    (sceneView.position.width - width) / 2,
                    -1,
                    width,
                    0
                                );

                activator = LudiqGUIUtility.GUIToScreenRect(activator);

                HierarchyPopup.Show(activator);
                e.Use();
            }
        }
 public static void ShowHierarchy(GameObject[] targets, Rect activatorPosition)
 {
     Validate(targets);
     HierarchyPopup.Show(targets, activatorPosition);
 }