示例#1
0
    private IEnumerator Start()
    {
        isOnVRState.value = false;

        yield return(new WaitUntil(() => ClientSpawnManager.Instance.isSpawningFinished));

        Debug.Log("Active Graphics Tier: " + Graphics.activeTier);
        instance = this;

        if (!GlobalName.Equals(instance.name))
        {
            Debug.LogError("The webvr.js script requires the WebVRManager gameobject to be named "
                           + GlobalName + " for proper functioning");
        }


        if (instance.dontDestroyOnLoad)
        {
            DontDestroyOnLoad(instance);
        }
        //OnStartVR();



        //Traditionaly in its own start the above was on awake
        GameStateManager.Instance.RegisterUpdatableObject(this);

#if !UNITY_EDITOR && UNITY_WEBGL
        ConfigureToggleVRKeyName(toggleVRKeyName);
        InitSharedArray(sharedArray, sharedArray.Length);
        ListenWebVRData();
#endif
        SetTrackingSpaceType();
    }
示例#2
0
    private void Awake()
    {
        instance = this;

        if (instance.dontDestroyOnLoad)
        {
            DontDestroyOnLoad(instance);
        }
    }
示例#3
0
    // Start is called before the first frame update
    void Start()
    {
        canvas    = GetComponentInChildren <Canvas>();
        vrManager = WebVRManager.instance;

        if (vrManager.vrState == WebVRState.NORMAL)
        {
            canvas.renderMode = RenderMode.ScreenSpaceOverlay;
        }
    }
示例#4
0
    private void Awake()
    {
        if (instance == null)
        {
            instance = this;
        }

        vrManager = GetComponent <WebVRManager>();
        if (vrManager.vrState == WebVRState.ENABLED)
        {
            head = vrHead;
        }
    }
    private void Awake()
    {
        Debug.Log("Active Graphics Tier: " + Graphics.activeTier);
        instance = this;

        if (!GlobalName.Equals(instance.name))
        {
            Debug.LogError("The webvr.js script requires the WebVRManager gameobject to be named "
                           + GlobalName + " for proper functioning");
        }

        if (instance.dontDestroyOnLoad)
        {
            DontDestroyOnLoad(instance);
        }
    }
示例#6
0
 void Awake()
 {
     instance = this;
 }
示例#7
0
 void Awake()
 {
     instance = this;
     setVrState(WebVRState.NORMAL);
 }
示例#8
0
 void Awake()
 {
     webVRManager = WebVRManager.Instance;
 }