LoginSignup
7
6

More than 5 years have passed since last update.

Unity拡張:GUILayout.Label で自動折り返し表示

Posted at

EditorWindow による独自ウィンドウ内にて GUILayout.Label を自動折り返し表示する方法。

GUIStyle.wordWrap

GUIStyle の wordWrap を true にすると自動折り返し表示されます。

void OnGUI()
{
    GUIStyle style = new GUIStyle(GUI.skin.label);
    style.wordWrap = true;
    GUILayout.Label("折り返し折り返し折り返し折り返し折り返し折り返し折り返し折り返し折り返し", style);
}

screenshot.png

サンプルプロジェクト

参考

7
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
6