LoginSignup
14
14

More than 5 years have passed since last update.

UnityでOculusに使えるGUI 「VRGUI」のご紹介

Last updated at Posted at 2014-09-19

OculusでOnGUIを使うとビルドした時にうまくいかなかったので
調べたらVRGUIというのが見つかったので試したらうまくいきました。
使い方は、簡単です。

ログインして「Unity GUI Package + Example」からVRGUI.zipをダウンロードしてください。
https://developer.oculusvr.com/forums/viewtopic.php?f=37&t=4944

MonoBehaviourを継承しているのでOnGUIと書き方は変わらない感じでした。

VRGuiSample
public class VRGuiSample : VRGUI
{
   public override void OnVRGUI()
   {
      GUILayout.BeginArea(new Rect(0f, 0f, Screen.width, Screen.height));
      if (GUILayout.Button("Click Me!"));
      GUILayout.EndArea();
   }
}
14
14
2

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
14
14