うにてぃブログ

主にUnityとC#に関する記事を書いていきます

GetRect

【Unity】GUILayoutUtility.GetRect が正しく取得できないことがある

下記コードで RenderTexture を表示させた場合は 下図のように横幅が広がってしまう // public static Rect GetRect(float minWidth, float maxWidth, float minHeight, float maxHeight); var rect = GUILayoutUtility.GetRect( 0, _renderTexture.width, 0…