This is a lightweight Twitch.tv IRC client for Unity.
Unity Twitch Chat parses chat messages into objects which you can easily use inside your Unity projects.
It also parses additional information such as: name color, badges and emotes.
- Twitch account
- Twitch OAuth token which you can get from https://twitchapps.com/tmi/
- Twitch channel name
- Create a new empty gameObject and add TwitchIRC.cs on it
- Enter your OAuth token, Twitch username and the name of a channel you want to use in the Unity inspector of TwitchIRC
- Create a new empty gameObject and a new C# script with an reference to the TwitchIRC.cs component
- Add a listener to TwitchIRC.newChatMessageEvent
I recommend looking at SimpleExample.cs for usage examples.
- TwitchIRC.ConnectIRC() -> Connects to Twitch IRC
- TwitchIRC.DisconnectIRC() -> Disconnects from Twitch IRC
- TwitchIRC.SendChatMessage(string) -> Sends a Twitch chat message
- TwitchIRC.Chatter.MessageContainsEmote(string) -> Returns true if chat message contains a specific emote (id)
- TwitchIRC.Chatter.HasBadge(string) -> Returns true if chat message sender has a specific badge
Spawns chatters as boxes that jump around. Box color is determined by chat badges