Twitch games making with EzTwitch Avatars

You can make Unity games that run on Twitch live streams where the Twitch chat audience can type things to control the game!

ClonzEh developed the EzTwitch Avatars asset and we heard rave reviews about it from Aurynsky as he built a game with it on his stream.

We met ClonzEh on FlipswitchX‘s stream which runs a game built with it and we decided to write a tutorial up explaining how to get started with making a Twitch game using ClonzEh’s asset package.

“Making Hello World is boring. I made EzTwitch so people new to Unity can make their first games for the whole world to play on Twitch  instead.” -ClonzEh

We began with an interview talking to ClonzEh live on our Twitch showing the asset, how the game works with it on Flipswitch’s channel, and the basics of getting an OAuth key out of Twitch to get it to start working.

Here’s the interview with ClonzEh in a VOD recorded broadcast. live video from Primerist on

And here’s his tutorial video:

He demos it in this video on the asset store and we plan to put it to use and have a tutorial added here soon so Gamebridge Unityversity beginners can get up to speed with using it for their first games. For starters, here’s the asset store description and README file.

We’ll follow up next with a more in-depth look at how to use EZTwitch to make a small but beautiful game for people to play on Twitch.!/content/62185

EzTwitch Avatars

Asset Category: Scripting/Integration
Asset Developer: ClonzeWork

Requires Unity 5.3.4 or higher.

EzTwitch Avatars can connect with your twitch channel to enhance your stream!

Ideal for crafting your own chat bot or game.

Use the primary demo to represent your viewers in a cute and interesting way that will promote viewer interaction to assist your channel in growing.

#Well documented code in C#
#Unity 5 Ready
#Viewer Profile Images
#4 demos
-Viewer Avatars
-Example UI
-Poll System
-Raffle System

Delegate events for:
*onUserMessage(includes whisper)

Supports Whispers
EzTwitch Namespace
Does not work with WEBGL***

GitHub: Clonzeh GitHub

It has all 5 star reviews so far:

Simple and good

This asset does what it’s there for, I personally really like it. One question though, how do I perform a Scene switch without loosing connection to twitch or without getting a MissingReferenceException off of the TwitchLoggin script?

Reply from publisher

Big thanks for the review!
I’m looking into it, but my first assumption would be to use unity’s object.DoNotDestroyOnLoad(gameObject); on Loggin script.

But you have to make sure the void Start() is not called again otherwise your unity may crash. I have a new version that fixes the crash. This may happen if you have the (_Controller saved in the scene you are currently on, and the scene you are switching to)

Another way could be to have some scene management as found in this tutorial:

Send me an email: so I can get back to you.

Best Twitch Asset here

It’s well commented and easy to modify. Couldn’t ask for more. Going to use it for a Twitch Plays afk game / givaway contest game on my #GameDev channel

The Readme File

When you try a Unity asset it is tempting to go straight to the demo scenes and hit play and get mad if nothing amazing happens immediately to gratify your inner 6 year old. When you use assets involving APIs, your inner six year old needs a time out and your grown up developer self needs to spend a few minutes signing up for API keys and getting codes to put into Unity before anything is going to work. Then your six year old can come back and play in the Twitch game making sandbox.

Here’s the README file from the asset and we’ll put a couple commentaries in parts where we can help clarify what you have to do.


//Getting Started

To get the demo working you must have the TwitchLoggin script in the scene. If you are using a demo scene you
can find the script attached to the _Controller game object.

Step 1) Create a new twitch account for your bot

Step 2) Visit while logged into your new twitch account to get the “OAuth” key

Step 3) Enter the account name, Oauth key, and the twitch channel you wish to connect to inside the TwitchLoggin script in the scene

// USING EzTwitch options inside your own scripts, For a live example you can open the scene Demo2

Inside your script add the namespace EzTwitch to your usings.

//We use delegates as events to ‘blackbox’ the twitch code from your code.
//this makes integrating with your code simple and uncomplicated.

//currentUsers This is a Dictionary filled with all current users in chat,

//(This may have bugs, email me if you have problems)
//if you have a user’s name, you can get information like: Is this user a subscriber/follower/mod/ or his profile image
//Exmaple: Twitch.currentUsers[“clonzeh”].followsChannel //this information is not loaded right away!

//*********below is a list of events you can gain access to*********

//onUserJoin //called when a user joins
//onUserLeave //called when user leaves
//onUserMessage //called when user sends a message
//onUpdateTick //called when the update timer ticks
//onRoomJoin //called when the bot joins a room
On void Start() { } You can tell EzTwitch to call your own methods on specifics events, for example,
If you want to know when a user joins you can have the following code:

// Simple example script, Similar to Demo2

using UnityEngine;
using System.Collections.Generic;
using EzTwitch;
using System.Collections;

public class ExampleScript : MonoBehaviour {

void Start() {
Twitch.onUserJoin += new UserJoin(UserJoined);

void UserJoined(string name) {

Debug.Log(name + ” has joined);

For questions, comments, or feedback, please email me at
I will do my best to respond as quickly as possible.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s