ScreenToGUIPoint() public static method

public static ScreenToGUIPoint ( Vector2 screenPoint ) : Vector2
screenPoint Vector2
return Vector2
コード例 #1
0
        public static Rect ScreenToGUIRect(Rect screenRect)
        {
            Vector2 vector = GUIUtility.ScreenToGUIPoint(new Vector2(screenRect.x, screenRect.y));

            screenRect.x = vector.x;
            screenRect.y = vector.y;
            return(screenRect);
        }