Exemplo n.º 1
0
    static IVRLoader()
    {
        if (EditorUserBuildSettings.activeBuildTarget != BuildTarget.Android)
        {
            return;
        }

        if (PlayerSettings.defaultInterfaceOrientation != UIOrientation.LandscapeLeft)
        {
            PlayerSettings.defaultInterfaceOrientation = UIOrientation.LandscapeLeft;
        }

        //if (QualitySettings.antiAliasing != 0 && QualitySettings.antiAliasing != 1)
        //{
        //    QualitySettings.antiAliasing = 1;
        //}

        if (QualitySettings.vSyncCount != 0)
        {
            QualitySettings.vSyncCount = 0;
        }
        GameObject IVRCamera = GameObject.Find("IVRCamera");

        if (IVRCamera != null)
        {
            CreateIVRCamera.RefrashCamer(IVRCamera);
        }

        TagHelper.AddTag("IVRCamera");
    }
Exemplo n.º 2
0
    static void CreateIVRGraphicRay()
    {
        Canvas target = Selection.activeGameObject.GetComponent <Canvas>();

        target.renderMode = RenderMode.WorldSpace;
        GameObject obj = GameObject.Find("IVRCamera");

        if (obj == null)
        {
            CreateIVRCamera.CreateCamera();
            obj = GameObject.Find("IVRCamera");
        }
        Transform anchorTras = obj.transform.Find("Anchor");

        target.worldCamera = anchorTras.GetComponent <Camera>();
        target.gameObject.AddComponent <IVRRaycaster>();
    }
Exemplo n.º 3
0
    static void CreateIVRPhysicRay()
    {
        GameObject obj = GameObject.Find("IVRCamera");

        if (obj == null)
        {
            CreateIVRCamera.CreateCamera();
            obj = GameObject.Find("IVRCamera");
        }
        Transform anchorTras = obj.transform.Find("Anchor");

        if (!anchorTras.GetComponent <IVRPhysicsRaycaster>())
        {
            anchorTras.gameObject.AddComponent <IVRPhysicsRaycaster>();
        }
        GameObject e = GameObject.Find("EventSystem");

        if (e == null)
        {
            CreateEventSystem();
            e = GameObject.Find("EventSystem");
        }
        e.GetComponent <IVRInputModule>().rayTransform = anchorTras.transform;
    }