Log in or register to post comments

How to create a pop-up menu in Unity with Vuforia

August 16, 2016 - 1:53am #1

Hello!

So I have my app more or less up and running. Now I am struggling to create a good UI. I have a canvas with buttons. one Menu that should be rendered out in bottom right of the screen when the app starts, if the user clicks the menu button, another menu should pop up with help, URL, support and close. I have managed to create the menu and animate it to pop up and close as well as link with the buttons. 

The problem is that all the buttons are always rendered out on screen. How do I make the second menu only pop up and become visible when the menu button is being pressed by the user?

I am using Unity 5 and Vuforia 6!

//S

How to create a pop-up menu in Unity with Vuforia

August 19, 2016 - 2:51am #2

This is a purely a unity related issue. So please post your question at http://answers.unity3d.com

To give you a hint anyway:

attach this script to your button or anywhere you whant and make your button call the ToggleMenu() function. Don't forget to assing your menu to it via inspector.

using UnityEngine;

public class MyMenu : MonoBehaviour
{
  public GameObject myMenu; // set this in the inspector

  public void ToggleMenu()
  {
    myMenu.SetActive(!myMenu.activeInHierarchy);
  }
}
Log in or register to post comments