Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Voting for the Unity Awards are OPEN! We’re looking to celebrate creators across games, industry, film, and many more categories. Cast your vote now for all categories
    Dismiss Notice
  3. Dismiss Notice

Simple VR UI

Discussion in 'AR/VR (XR) Discussion' started by pocketmikey, Aug 4, 2018.

  1. pocketmikey

    pocketmikey

    Joined:
    Aug 4, 2018
    Posts:
    6
    Hello!

    I'm relatively new to Unity--after jumping ship from Unreal I'm trying to find my way around this new world. One thing I'm trying to do is create a simple UI settings menu. Something that can pop up (doesn't need to follow the user's point of view), has a few tabs or pages or whatever, then can be closed.

    I know that I need to use a canvas that's set to world space, and I can figure out setting up buttons and all, but I can't figure out how to make the canvas multi-tabbed or multi-paged, and how to have the canvas open & close when a button is pressed. Am I correct in thinking that a canvas can have multiple pages or tabs, or should I be creating a different parent element which contains multiple canvases? I'm not finding many tutorials online dealing with 3d menus in a VR environment.

    Thanks to anyone who can point me in the right direction!
     
  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,840
    Your questions have nothing to do with the menus being "3D" (whatever that means) or VR. A canvas is a canvas. (The only caution is that you'll want your canvas to be in World Space mode, but you already figured that out.)

    So you just need to go through a few of the UI tutorials (which you'll quickly find via the Learn link at the top of this page). Multiple pages/tabs are nothing more or less than activating/deactivating GameObjects within your canvas, arranged however you want them. Same for opening/closing the canvas in response to a button or some game event.
     
    pocketmikey likes this.
  3. pocketmikey

    pocketmikey

    Joined:
    Aug 4, 2018
    Posts:
    6
    Thank you so much! I guess I was thrown off by the 3d element, but I ended up figuring it out after realizing what you said, that a canvas is a canvas.

    Cheers!
     
    JoeStrout likes this.