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 } }