예제 #1
0
    private void IosStart()
    {
        Instance = this;
        SCameraManager.CreateCamera(SCameraType.EASYAR);
        GameObject Gyro = new GameObject();

        Gyro.name = "GyroController";
        Gyro.AddComponent <MySkyGyroController>();
        Gyro.transform.SetParent(GameObject.Find("Manager").gameObject.transform);
        Gyro.transform.localPosition = Vector3.zero;
        SCameraManager.currentCamera.gameObject.transform.SetParent(Gyro.transform);
        m_BlurOptimized = SCameraManager.currentCamera.camera.gameObject.GetComponent <BlurOptimized>();
        m_SUILoading    = SUILoading.CreateLoading();
        Start3D         = PlayerPrefs.GetInt("3DStart");
        Start3D++;
        PlayerPrefs.SetInt("3DStart", Start3D);
        // PlayerPrefs.SetInt("GUIDE3D", 1);
        MsgBase.MsgAdd <string>("OnOpenScene", OnOpenScene);
        MsgBase.MsgAdd <string, Callback>("RemoveScene2", RemoveScene2);
        MsgBase.MsgAdd <string>("RemoveScene", RemoveScene1);
        MsgBase.MsgAdd("RemoveTutorial", RemoveTutorial);
        MsgBase.MsgAdd <string>("HideScene", HideScene);
        MsgBase.MsgAdd <bool, float>("ShowBlur", ShowBlur);
        OnOpenScene("UI");
        if (PlayerPrefs.GetInt("GUIDE3D") == 3)
        {
            OnOpenScene("PhotoScene");
        }
    }
예제 #2
0
    // Use this for initialization
    void Start()
    {
#if UNITY_IOS
        Messenger.AddListener("U2N_N_StartAppCamera",
                              delegate(){
            //TODO 开启场景和AR相机
            IosStart();
        });
#endif
#if UNITY_ANDROID
        Instance = this;
        SCameraManager.CreateCamera(SCameraType.EASYAR);
        GameObject Gyro = new GameObject();
        Gyro.name = "GyroController";
        Gyro.AddComponent <MySkyGyroController>();
        Gyro.transform.SetParent(GameObject.Find("Manager").gameObject.transform);
        Gyro.transform.localPosition = Vector3.zero;
        SCameraManager.currentCamera.gameObject.transform.SetParent(Gyro.transform);
        m_BlurOptimized = SCameraManager.currentCamera.camera.gameObject.GetComponent <BlurOptimized>();
        m_SUILoading    = SUILoading.CreateLoading();
        Start3D         = PlayerPrefs.GetInt("3DStart");
        Start3D++;
        PlayerPrefs.SetInt("3DStart", Start3D);
        // PlayerPrefs.SetInt("GUIDE3D", 1);
        MsgBase.MsgAdd <string>("OnOpenScene", OnOpenScene);
        MsgBase.MsgAdd <string, Callback>("RemoveScene2", RemoveScene2);
        MsgBase.MsgAdd <string>("RemoveScene", RemoveScene1);
        MsgBase.MsgAdd("RemoveTutorial", RemoveTutorial);
        MsgBase.MsgAdd <string>("HideScene", HideScene);
        MsgBase.MsgAdd <bool, float>("ShowBlur", ShowBlur);
        OnOpenScene("UI");
        // if (PlayerPrefs.GetInt("GUIDE3D") == 3)
        {
            // OnOpenScene("PhotoScene");
        }
#endif
    }