最終更新:2019-04-26 (金) 17:16:17 (1820d)  

MonoBehaviour.OnGUI
Top / MonoBehaviour.OnGUI

レンダリングと GUI イベントのハンドリングのために呼び出されます

https://docs.unity3d.com/ja/current/ScriptReference/MonoBehaviour.OnGUI.html

メモ

  • OnGUI を実装した際には毎フレーム複数回(イベントごとに 1 回)呼び出されることを意味します。

  •     void OnGUI()
        {
            if (GUI.Button(new Rect(10, 10, 150, 100), "I am a button"))
            {
                print("You clicked the button!");
            }
        }

関連