This is a lightweight and efficient Twitch.tv IRC client for Unity.
In short, this allows you to integrate Twitch Chat to your Unity projects.
The primary goal is to be able to read and send chat messages as efficiently as possible.
+
button in the top left cornerAdd package from git URL...
Add
https://github.com/lexonegit/Unity-Twitch-Chat.git?path=/Unity-Twitch-Chat/Assets/Package
Twitch IRC
component.Use Anonymous Login
to use without OAuthConnect IRC On Start
and Join Channel On Start
are enabled and press play – You should now see JOIN messages, etc. in the console.IRC.OnChatMessage
event.
Chatter
objects which contain information about each chat message, such as the chatter name, message, emotes, etc...Having issues? Check out the included ExampleProject for a better understanding.
Spawn chatters as jumping boxes. Box color is based on their primary badge.
void
Connect() - Connects to Twitch IRCvoid
Disconnect() - Disconnects from Twitch IRCvoid
SendChatMessage(string message) - Sends a chat message to the channelvoid
JoinChannel(string channel) - Join a Twitch channelvoid
LeaveChannel(string channel) - Leave a Twitch channelvoid
Ping() - Sends a PING message to the Twitch IRC serverevent
OnChatMessage - Event that is invoked when a chat message is receivedevent
OnConnectionAlert - Event that is invoked when a connection alert is receivedIRCTags
ClientUserTags - Returns the tags of the client user (badges, name color, etc)Color
GetNameColor() - Returns the color of the chatter's namebool
IsDisplayNameFontSafe() - Returns true if displayName is "font-safe" meaning that it only contains characters: a-z, A-Z, 0-9, _bool
ContainsEmote(string emoteId) - Returns true if the chatter's message contains the specified emote (by id)bool
HasBadge(string badgeName) - Returns true if the chatter has the specified badgeIntro Fighters, stream overlay game https://lexone.itch.io/introfighters
Did you make something cool? Contact me (lexone on Discord) to get featured here!