4.6 Options UI to Game

Hi I am using the new 4.6 unity UI feature and I have two seperate scenes. One for my options and one for my game. How can I connect both together so I can get things such as the fov working with the game camera and make it work when i press esc

So you have your options menu in one scene and your game in another and you want to be able to open your menu from the game?

  1. Start in your menu scene

  2. Make your options ui hierarchy a prefab

  3. Go to your game scene

  4. Drag in your prefab (Make sure you have a canvas in there and that the prefab is a child of it)

  5. Write a script that toggles the menu when you press ESC:

    using UnityEngine;

    public class ToggleMenu : MonoBehaviour {

    public GameObject optionsMenu;
    
    void Update () {
    	if(Input.GetKeyDown(KeyCode.Escape)){
    		optionsMenu.SetActive(!optionsMenu.activeSelf);
    	}
    }
    

    }

  6. Put script on Canvas (or anywhere really)

  7. Drag your options menu top-level gameobject into the optionsMenu field on the ToggleMenu script in the inspector

  8. Revel in your new game menu!