示例#1
0
        public WinFormsChatController()
        {
            m_CoreApi = CoreApi.Instance;

            if (m_CoreApi == null)
            {
                m_CoreApi = new StandardCoreApi();
            }

            m_ChatApi = new StandardChatApi();
        }
        public WinFormsBroadcastController()
        {
            m_CoreApi = CoreApi.Instance;

            if (m_CoreApi == null)
            {
                m_CoreApi = new StandardCoreApi();
            }

            m_BroadcastApi = new Twitch.Broadcast.DesktopBroadcastApi();
        }
        public WinFormsChatController()
        {
            m_CoreApi = CoreApi.Instance;

            if (m_CoreApi == null)
            {
                m_CoreApi = new StandardCoreApi();
            }

            m_ChatApi = new StandardChatApi();
        }
        public WinFormsBroadcastController()
        {
            m_CoreApi = CoreApi.Instance;

            if (m_CoreApi == null)
            {
                m_CoreApi = new StandardCoreApi();
            }

            m_BroadcastApi = new Twitch.Broadcast.DesktopBroadcastApi();
        }
        public XnaBroadcastController()
        {
            m_CoreApi = CoreApi.Instance;

            if (m_CoreApi == null)
            {
                m_CoreApi = new StandardCoreApi();
            }

            m_XnaBroadcastApi = new Twitch.Broadcast.DesktopXnaBroadcastApi();
            m_BroadcastApi = m_XnaBroadcastApi;
        }
        public XnaBroadcastController()
        {
            m_CoreApi = CoreApi.Instance;

            if (m_CoreApi == null)
            {
                m_CoreApi = new StandardCoreApi();
            }

            m_XnaBroadcastApi = new Twitch.Broadcast.DesktopXnaBroadcastApi();
            m_BroadcastApi    = m_XnaBroadcastApi;
        }
        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()
        {
            // force the twitch libraries to be loaded
            Twitch.Broadcast.UnityBroadcastController.LoadTwitchLibraries();

            m_CoreApi = CoreApi.Instance;

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

                m_ChatApi = new StandardChatApi();
            }
            else if (Application.platform == RuntimePlatform.OSXEditor ||
                     Application.platform == RuntimePlatform.OSXPlayer)
            {
                if (m_CoreApi == null)
                {
                    m_CoreApi = new StandardCoreApi();
                }

                m_ChatApi = new StandardChatApi();
            }
            else if (Application.platform == RuntimePlatform.IPhonePlayer)
            {
                if (m_CoreApi == null)
                {
                    m_CoreApi = new UnityIosCoreApi();
                }

                m_UnityIosChatApi = new UnityIosChatApi();
                m_ChatApi         = m_UnityIosChatApi;
            }
            else if (Application.platform == RuntimePlatform.Android)
            {
                // TODO: not supported yet
            }
            else
            {
                // TODO: not supported yet
            }
        }
        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()
        {
            // force the twitch libraries to be loaded
            Twitch.Broadcast.UnityBroadcastController.LoadTwitchLibraries();

            m_CoreApi = CoreApi.Instance;

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

                m_ChatApi = new StandardChatApi();
            }
            else if (Application.platform == RuntimePlatform.OSXEditor ||
                     Application.platform == RuntimePlatform.OSXPlayer)
            {
                if (m_CoreApi == null)
                {
                    m_CoreApi = new StandardCoreApi();
                }

                m_ChatApi = new StandardChatApi();
            }
            else if (Application.platform == RuntimePlatform.IPhonePlayer)
            {
                if (m_CoreApi == null)
                {
                    m_CoreApi = new UnityIosCoreApi();
                }

                m_UnityIosChatApi = new UnityIosChatApi();
                m_ChatApi = m_UnityIosChatApi;
            }
            else if (Application.platform == RuntimePlatform.Android)
            {
                // TODO: not supported yet
            }
            else
            {
                // TODO: not supported yet
            }
        }