コード例 #1
0
        void CreateColorScreenShot(int i)
        {
            CommentBoxSceneGUI.Disable();

            var helpers = FindObjectsOfType <BlockoutHelper>().ToList();

            helpers.ForEach(x => x.HideLockedState());

            CaptureScreenShot(i);

            helpers.ForEach(x => x.ShowLockedState());
        }
コード例 #2
0
        void CreateWhiteScreenShot(int i)
        {
            CommentBoxSceneGUI.Disable();
            var helpers = FindObjectsOfType <BlockoutHelper>().ToList();

            helpers.ForEach(x => x.HideLockedState());

            BlockoutStaticFunctions.ApplyNewMaterialSchemeWithoutUndo(screenshotWhiteMaterial, blockoutHierarchy.root.gameObject);

            CaptureScreenShot(i);

            BlockoutStaticFunctions.ApplyCurrentTheme();
            helpers.ForEach(x => x.ShowLockedState());
        }
コード例 #3
0
        public override void Update()
        {
            if (showSceneInformationInternal != showSceneInformation)
            {
                showSceneInformationInternal   = showSceneInformation;
                CommentBoxSceneGUI.GlobalNotes = GlobalNotes;

                if (showSceneInformation)
                {
                    CommentBoxSceneGUI.Enable();
                }
                else
                {
                    CommentBoxSceneGUI.Disable();
                }

                if (SceneView.lastActiveSceneView)
                {
                    SceneView.lastActiveSceneView.Repaint();
                }
            }

            if (showAreaCommentsInternal != showAreaComments)
            {
                CommentBoxSceneGUI.showAreaComments = showAreaComments;
                showAreaCommentsInternal            = showAreaComments;
            }

            if (showPinCommentsInternal != showPinComments)
            {
                CommentBoxSceneGUI.showPinComments = showPinComments;
                showPinCommentsInternal            = showPinComments;
            }

            if (CommentBoxSceneGUI.ShowCommentInfoInternal != CommentBoxSceneGUI.ShowCommentInfo)
            {
                CommentBoxSceneGUI.GlobalNotes = GlobalNotes;
                if (SceneView.currentDrawingSceneView)
                {
                    SceneView.currentDrawingSceneView.Repaint();
                }
                else if (SceneView.lastActiveSceneView)
                {
                    SceneView.lastActiveSceneView.Repaint();
                }
                CommentBoxSceneGUI.ShowCommentInfoInternal = CommentBoxSceneGUI.ShowCommentInfo;
            }

            // Repaint window is a area / pin comment is selected
            if (Selection.activeGameObject)
            {
                if (Selection.activeGameObject.GetComponentInParent <BlockoutPinGizmo>())
                {
                    selectedNote = Selection.activeGameObject.GetComponentInParent <BlockoutPinGizmo>()
                                   .GetComponent <Notepad>();
                    repaint = true;
                }
                else if (Selection.activeGameObject.GetComponent <BlockoutSceneViewCubeGizmo>())
                {
                    selectedNote = Selection.activeGameObject.GetComponent <BlockoutSceneViewCubeGizmo>()
                                   .GetComponent <Notepad>();
                    repaint = true;
                }
                else if (Selection.activeGameObject.GetComponent <Notepad>())
                {
                    selectedNote = Selection.activeGameObject.GetComponent <Notepad>();
                    repaint      = true;
                }
                else
                {
                    selectedNote = null;
                    repaint      = true;
                }
            }
            else
            {
                selectedNote = null;
                repaint      = true;
            }

            // Set text colour if chanaged
            if (sceneViewTextColor != sceneViewTextColorInternal)
            {
                CommentBoxSceneGUI.textColor = sceneViewTextColor;
                sceneViewTextColorInternal   = sceneViewTextColor;
                if (SceneView.lastActiveSceneView)
                {
                    SceneView.lastActiveSceneView.Repaint();
                }
            }
        }