UnityEditor.ScreenShots.GetGUIViewName C# (CSharp) Method

GetGUIViewName() private static method

private static GetGUIViewName ( GUIView view ) : string
view GUIView
return string
        private static string GetGUIViewName(GUIView view)
        {
            HostView view2 = view as HostView;
            if (view2 != null)
            {
                return view2.actualView.GetType().Name;
            }
            return "Window";
        }

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::GetGUIViewName