UnityEditor.ScreenShots.GetMouseOverView C# (CSharp) Method

GetMouseOverView() private static method

private static GetMouseOverView ( ) : GUIView
return GUIView
        private static GUIView GetMouseOverView()
        {
            GUIView mouseOverView = GUIView.mouseOverView;
            if (mouseOverView == null)
            {
                EditorApplication.Beep();
                Debug.LogWarning("Could not take screenshot.");
            }
            return mouseOverView;
        }

Usage Example

示例#1
0
        public static void Screenshot()
        {
            GUIView mouseOverView = ScreenShots.GetMouseOverView();

            if (mouseOverView != null)
            {
                string gUIViewName    = ScreenShots.GetGUIViewName(mouseOverView);
                Rect   screenPosition = mouseOverView.screenPosition;
                screenPosition.y      -= 1f;
                screenPosition.height += 2f;
                ScreenShots.SaveScreenShot(screenPosition, gUIViewName);
            }
        }
All Usage Examples Of UnityEditor.ScreenShots::GetMouseOverView