Exemplo n.º 1
0
        public WinFormsChatController()
        {
            m_CoreApi = CoreApi.Instance;

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

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

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

            m_ChatApi = new StandardChatApi();
        }
        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
            }
        }
Exemplo n.º 4
0
        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
            }
        }