Ejemplo n.º 1
0
        protected void Awake()
        {
            LoadTwitchLibraries();

            m_CoreApi = CoreApi.Instance;

            if (Application.platform == RuntimePlatform.WindowsEditor ||
                Application.platform == RuntimePlatform.WindowsPlayer)
            {
                if (m_CoreApi == null)
                {
                    m_CoreApi = new StandardCoreApi();
                }

                m_UnityBroadcastApi  = new DesktopUnityBroadcastApi();
                m_AudioCaptureMethod = GameAudioCaptureMethod.SystemCapture;
            }
            else if (Application.platform == RuntimePlatform.OSXEditor ||
                     Application.platform == RuntimePlatform.OSXPlayer)
            {
                if (m_CoreApi == null)
                {
                    m_CoreApi = new StandardCoreApi();
                }

                m_UnityBroadcastApi  = new DesktopUnityBroadcastApi();
                m_AudioCaptureMethod = GameAudioCaptureMethod.Passthrough;
            }
            else if (Application.platform == RuntimePlatform.IPhonePlayer)
            {
                if (m_CoreApi == null)
                {
                    m_CoreApi = new UnityIosCoreApi();
                }

                m_UnityBroadcastApi  = new UnityIosBroadcastApi();
                m_AudioCaptureMethod = GameAudioCaptureMethod.Passthrough;
            }
            else if (Application.platform == RuntimePlatform.Android)
            {
                // TODO: not supported yet
            }
            else
            {
                // TODO: not supported yet
            }

            m_BroadcastApi = m_UnityBroadcastApi;
        }
        protected void Awake()
        {
            LoadTwitchLibraries();

            m_CoreApi = CoreApi.Instance;

            if (Application.platform == RuntimePlatform.WindowsEditor ||
                Application.platform == RuntimePlatform.WindowsPlayer)
            {
                if (m_CoreApi == null)
                {
                    m_CoreApi = new StandardCoreApi();
                }

                m_UnityBroadcastApi = new DesktopUnityBroadcastApi();
                m_AudioCaptureMethod = GameAudioCaptureMethod.SystemCapture;
            }
            else if (Application.platform == RuntimePlatform.OSXEditor ||
                     Application.platform == RuntimePlatform.OSXPlayer)
            {
                if (m_CoreApi == null)
                {
                    m_CoreApi = new StandardCoreApi();
                }

                m_UnityBroadcastApi = new DesktopUnityBroadcastApi();
                m_AudioCaptureMethod = GameAudioCaptureMethod.Passthrough;
            }
            else if (Application.platform == RuntimePlatform.IPhonePlayer)
            {
                if (m_CoreApi == null)
                {
                    m_CoreApi = new UnityIosCoreApi();
                }

                m_UnityBroadcastApi = new UnityIosBroadcastApi();
                m_AudioCaptureMethod = GameAudioCaptureMethod.Passthrough;
            }
            else if (Application.platform == RuntimePlatform.Android)
            {
                // TODO: not supported yet
            }
            else
            {
                // TODO: not supported yet
            }

            m_BroadcastApi = m_UnityBroadcastApi;
        }