Exemplo n.º 1
0
        protected override void Awake()
        {
            IUnityPlayer unityPlayer = new NullUnityPlayer();

            // instantiate the correct UnityPlayer for the current platform
            if (Application.platform == RuntimePlatform.Android)
            {
                unityPlayer = new AndroidUnityPlayer();
            }
            else if (Application.platform == RuntimePlatform.IPhonePlayer)
            {
                unityPlayer = new IOSUnityPlayer();
            }
            else if (VuforiaRuntimeUtilities.IsPlayMode())
            {
                unityPlayer = new PlayModeUnityPlayer();
            }

            SetUnityPlayerImplementation(unityPlayer);

            gameObject.AddComponent <ComponentFactoryStarterBehaviour>();



            base.Awake();
        }
Exemplo n.º 2
0
        protected void Awake()
        {
            IUnityPlayer unityPlayer = new NullUnityPlayer();

            // instantiate the correct UnityPlayer for the current platform
            if (Application.platform == RuntimePlatform.Android)
            {
                unityPlayer = new AndroidUnityPlayer();
            }
            else if (Application.platform == RuntimePlatform.IPhonePlayer)
            {
                unityPlayer = new IOSUnityPlayer();
            }
            else if (VuforiaRuntimeUtilities.IsPlayMode())
            {
                unityPlayer = new PlayModeUnityPlayer();
            }

            SetUnityPlayerImplementation(unityPlayer);

            VuforiaBehaviour.Instance.RegisterVuforiaStartedCallback(OnVuforiaStarted);
            VuforiaBehaviour.Instance.RegisterOnPauseCallback(OnPaused);

            gameObject.AddComponent <ComponentFactoryStarterBehaviour>();
        }
Exemplo n.º 3
0
        protected void Awake()
        {
            IUnityPlayer unityPlayer = new NullUnityPlayer();

            // instantiate the correct UnityPlayer for the current platform
            if (Application.platform == RuntimePlatform.Android)
                unityPlayer = new AndroidUnityPlayer();
            else if (Application.platform == RuntimePlatform.IPhonePlayer)
                unityPlayer = new IOSUnityPlayer();
            else if (QCARRuntimeUtilities.IsPlayMode())
                unityPlayer = new PlayModeUnityPlayer();

            SetUnityPlayerImplementation(unityPlayer);

            gameObject.AddComponent<ComponentFactoryStarterBehaviour>();
        }
Exemplo n.º 4
0
        protected void Awake()
        {
            IUnityPlayer unityPlayer = new NullUnityPlayer();

            // instantiate the correct UnityPlayer for the current platform
            if (Application.platform == RuntimePlatform.Android)
                unityPlayer = new AndroidUnityPlayer();
            else if (Application.platform == RuntimePlatform.IPhonePlayer)
                unityPlayer = new IOSUnityPlayer();
            else if (VuforiaRuntimeUtilities.IsPlayMode())
                unityPlayer = new PlayModeUnityPlayer();

            SetUnityPlayerImplementation(unityPlayer);

            VuforiaBehaviour.Instance.RegisterVuforiaStartedCallback(OnVuforiaStarted);
            VuforiaBehaviour.Instance.RegisterOnPauseCallback(OnPaused);

            gameObject.AddComponent<ComponentFactoryStarterBehaviour>();
        }
Exemplo n.º 5
0
        /// <summary>
        /// Create platform-specific unity player
        /// </summary>
        private static IUnityPlayer CreateUnityPlayer()
        {
            IUnityPlayer unityPlayer = new NullUnityPlayer();

            // instantiate the correct UnityPlayer for the current platform
            if (Application.platform == RuntimePlatform.Android)
            {
                unityPlayer = new AndroidUnityPlayer();
            }
            else if (VuforiaRuntimeUtilities.IsPlayMode())
            {
                unityPlayer = new PlayModeUnityPlayer();
            }
            else if (VuforiaRuntimeUtilities.IsWSARuntime())
            {
                unityPlayer = new WSAUnityPlayer();
            }

            return(unityPlayer);
        }