Ejemplo n.º 1
0
    void Awake()
    {
        if (_playerView != null)
        {
            _play = _playerView;

            //NOTE: the OZO Player SDK license ID should be given in the OZOPlayer gameobject
            _play.Init(true, false, false); //the "allow exclusive mode audio" works only in standalone player, when you have set "Disable Unity Audio"
        }
    }
Ejemplo n.º 2
0
    // Use this for initialization
    void Start()
    {
#if UNITY_2017_2_OR_NEWER
        UnityEngine.XR.InputTracking.Recenter();
#else
        UnityEngine.VR.InputTracking.Recenter();
#endif
#if UNITY_EDITOR
        UnityEditor.EditorApplication.playmodeStateChanged = HandleOnPlayModeChanged;
#endif

        if (_playerView != null)
        {
            _play = _playerView;
            _play.OnPlayModeChanged += MPlay_OnPlayModeChanged;
        }
        else
        {
            Debug.LogError("Please Set the OZOPlayer for PlayControl");
        }
    }