Example #1
0
    //-------------------------------------------------
    void Awake()
    {
        _instance = this;

        if (firstTimeAwake)
        {
            firstTimeAwake = false;
        }
        else
        {
            /**
             * If the game is started in the Playing scene, asume we are testing and just load level 0
             **/
            if (SceneManager.GetActiveScene().name == "Playing")
            {
                usedCamera = GameObject.Find("ARCamera").GetComponent <Camera>();
                print("used camera set :" + usedCamera);


                if (Application.platform != RuntimePlatform.Android)
                {
                    isInFallBack = true;
                    if (gameStateManager.getGlobalStateIndex() == GameStateManager.STATE_PLAYING)
                    {
                        GameObject.Find("ARCamera").SetActive(false);
                        GameObject.Find("ImageTarget").SetActive(false);
                        foreach (Camera cam in Resources.FindObjectsOfTypeAll(typeof(Camera)))
                        {
                            if (cam.name == "FallbackCamera")
                            {
                                cam.gameObject.SetActive(true);
                                usedCamera = cam;
                            }
                        }
                    }
                }
                else
                {
                    GameObject.Find("MoveButtons").SetActive(false);
                }
            }
        }
    }
Example #2
0
 void Start()
 {
     fallbackManagerScript = Object.FindObjectOfType <FallbackManagerScript>();
 }
Example #3
0
 //-------------------------------------------------
 void Awake()
 {
     _instance = this;
 }