コード例 #1
0
    // Update is called once per frame
    private void Update()
    {
        if (welcome == false)
        {
            readText.Say("Welcome to mixed reality training!");
            welcome = true;
        }
        //Place menu
        if (mobileMenu)
        {
            menuMove();
        }

        //Menu faces user
        if (billboard)
        {
            this.transform.forward = Camera.main.transform.forward;
        }

#if UNITY_EDITOR
        // Stop panel from moving in editor
        if (Input.GetKeyDown(KeyCode.M))
        {
            mobileMenu = false;
            GameObject menuPanel   = this.transform.FindChild("RoomSelection").gameObject;
            GameObject startCanvas = this.transform.FindChild("FirstMenu").gameObject;

            menuPanel.SetActive(true);
            menuPanel.transform.position = startCanvas.transform.position;
            startCanvas.SetActive(false);
        }
#endif
    }