Twitch integration with Unity Tutorial

  Рет қаралды 15,064

PabloMakes

PabloMakes

Күн бұрын

We will look at how to connect your game to Twitch chat so they can play it, like in Twitch plays, or affect it like they cna add power ups or create enemies, etc.
Previous Tutorial
• Radial Menu Tutorial f...
(づ ̄ ³ ̄)づ ~(˘▾˘~)
TWITCH ( ͡° ͜ʖ ͡°)
/ pablomakes
TWITTER (ಥ﹏ಥ)
/ pablomakes
#unity #tutorial #twitch

Пікірлер: 97
@PabloMakes
@PabloMakes 3 жыл бұрын
Saw this tutorial a couple days ago that builds further on what I show here, hopefully you find it useful. twitter.com/minionsart/status/1412400308156837895
@jordan4longshaw
@jordan4longshaw 3 жыл бұрын
Won't be used in my game as it doesn't have a need for it. But I love that people like you are there to help those who need it. Keep up the good work!
@Rogueixpresents
@Rogueixpresents Жыл бұрын
yeah twitch integration total of 5 players is not really useful.
@BlakeLeftwich
@BlakeLeftwich 10 ай бұрын
This helped me get it working fast. Thanks! I’d love a video that shows how to write messages inside the text chat.
@2Spline
@2Spline 3 жыл бұрын
Pet pet pet pet pet pet. Clear instructions for setting up such a fun effect! Can definitely get creative with a variety of interactions. Very helpful!
@PabloMakes
@PabloMakes 3 жыл бұрын
Thanks! Truly couldn’t have done it without your helping hand 🤚
@2Spline
@2Spline 3 жыл бұрын
@@PabloMakes 👉😎👉 I gotchu.
@nrXic
@nrXic 2 жыл бұрын
I watch my fair share of tutorials, and this was well done in every single respect. Stellar work. Subbed!
@PabloMakes
@PabloMakes 2 жыл бұрын
Thanks!
@slightlyniceron
@slightlyniceron 3 жыл бұрын
You have such a relaxing way to explain things in an easy way. Would love to see a tutorial about connecting Twitch Pubsub and basics about it within unity.
@PabloMakes
@PabloMakes 3 жыл бұрын
That could be a fun one to make I do have thoughts for a new twitch project after I’m done with my current game
@slightlyniceron
@slightlyniceron 3 жыл бұрын
@@PabloMakes I would definitely watch it as I'm currently trying to integrate my Channelpoints directly into my Unity Project and I'm a bit lost right now 'cause I'm pretty new to this kind of stuff.
@PabloMakes
@PabloMakes 3 жыл бұрын
I haven’t played around with points so can’t help you out unfortunately. I imagine you are already doing this, but you should use Twitch Lib , I imagine they have support for this, you can fairly easily convert the chat tutorial into Twitch Lib too
@slightlyniceron
@slightlyniceron 3 жыл бұрын
@@PabloMakes I'll give it a try. Thanks for the advice. You're a good soul. :)
@Kishy
@Kishy 3 жыл бұрын
I love your tutorials, thank you so much for these! The quality is great and the explanations are easy to understand
@PabloMakes
@PabloMakes 3 жыл бұрын
Thanks a lot for your comment. It lifted my spirits
@Kishy
@Kishy 3 жыл бұрын
@@PabloMakes I'm really glad to hear! c:
@prayagsahu4445
@prayagsahu4445 3 жыл бұрын
bro tutorials are great , keep on making 🔥🔥🔥 everytime i watch i learn something new ❤️❤️
@PabloMakes
@PabloMakes 3 жыл бұрын
Thanks! Glad you enjoyed them, need to make time to make more 😅
@AflorAStudios
@AflorAStudios 3 жыл бұрын
this is such a cool idea, Loved more of the Game than the fruit... for sure following along with your cool game. Thank you
@PabloMakes
@PabloMakes 3 жыл бұрын
I finished the chess game! So far only one other streamer played with his community a few times. Now I need to promote it 😅but I have more fun making things rather than promote them haha
@AflorAStudios
@AflorAStudios 3 жыл бұрын
@@PabloMakes Good day, i am with you there, i cant seem to "sale myself or stuff" if my life was onthe line. if you do not mind a bit of a wait ill be happy to try it out. just not streaming for a small bit due to moving across the states. you do happen to know you can export your streams from twitch to youtube 24hrs after streaming.
@PabloMakes
@PabloMakes 3 жыл бұрын
Yeah, I’ve been meaning to make a vod channel in KZbin just to keep a history.
@subbu6572
@subbu6572 3 жыл бұрын
wow dude this is a really fun functionality. thanks.
@wispre3800
@wispre3800 3 жыл бұрын
This is amazing Edit: I wish you had more videos but I guess I will be on my own for a while. I believe you will make it big. Content is to the point, camera quality is amazing, easy to follow. Great job !
@PabloMakes
@PabloMakes 3 жыл бұрын
Thanks for the kind words and the guilt trip 😅 I’m working on a new tutorial now, but it’s pretty long so editing takes a while. Soon ™️
@Darth_Apnea
@Darth_Apnea 3 жыл бұрын
Great video pablo, will be using this very thing in my next project - I was just looking for this almost exactly when you uploaded it hahaha!
@PabloMakes
@PabloMakes 3 жыл бұрын
I gotchu!
@Ha1wen
@Ha1wen 11 ай бұрын
Thank you so much! Great tutorial, great explanation, great video in general. Works like a charm!
@anubis520
@anubis520 Жыл бұрын
I've been trying to figure this out for a while but can't seem to get it to change channels. I set the channel to the string I want it to join and run the connect function, it takes the channel connected as the new string but doesn't seem to actually join and read the chat. It not longer takes commands from the original channel but doesn't take commands from the new on either. I also tried removing the connect command from start, let the user change set the channel name and then trying to start but that doesn't seem to work either.
@shreckgaming-clashroyale1896
@shreckgaming-clashroyale1896 3 жыл бұрын
Very wholesome underrated content.
@ian4599
@ian4599 3 жыл бұрын
This is so underated. Thanks Pablo!
@BrandonFerrentino
@BrandonFerrentino Жыл бұрын
Underrated channel.
@schwarzenego
@schwarzenego Жыл бұрын
Hey man. thank you very much for the great tutorial! I know its been over a year haha, but, how would you go about securing the credentials in a released game? Like, if I wanted to publish a game to steam and use this method for streamers to connect to a channel so the game can parse the chat... most of the material I find has the credentials hardcoded for the "bot" account somewhere, but that doesn't sound very safe?
@joewannimozzarella
@joewannimozzarella 2 жыл бұрын
Hey, can you maybe do a tutorial on how my game can interact with raids and follows?
@NevaranUniverse
@NevaranUniverse 2 жыл бұрын
Best example of the ones ive seen, but none seem to show how to fetch the chatter's profile picture, or having a "connected" and "disconnected" events from the TCP connection
@PabloMakes
@PabloMakes 2 жыл бұрын
Never looked into chatters profile, but for the tcp part it indeed is a pain. TCP doesn’t have events like that, even the connected property only shows the state on the last operation, so can easily lie. What you end up having to do is rely on ping exchanges and if one of those fails you know you lost connection and restore it. Hope that helps
@NevaranUniverse
@NevaranUniverse 2 жыл бұрын
@@PabloMakes That is gonna be a lot of pings then! What I need it for is for initial "account login" update to update the current person that is logged into twitch
@NevaranUniverse
@NevaranUniverse 2 жыл бұрын
Update, I managed to to make a few events based on what message you receive from the connection which seems to be working well enough, though trying to "log out" by closing all streams and the client ends up logging you back up for some reason.
@Gabykk
@Gabykk 3 жыл бұрын
Dude that's so smooth.
@NoodleAM
@NoodleAM Жыл бұрын
How can I check if the user is connected or not, Im checking it to show a advertisment about if the user is connected to his tiwtch chat or not :D
@roygatz
@roygatz 3 жыл бұрын
This is a great video Pablo
@CraftyMCFish
@CraftyMCFish 14 күн бұрын
Thanks so much!
@VishalSiddireddy
@VishalSiddireddy 3 жыл бұрын
This looks really cool!
@chickenmission9156
@chickenmission9156 Жыл бұрын
amazing tutorial
@ripporkpoopy6577
@ripporkpoopy6577 3 жыл бұрын
Great job ! Wonderful video ! Are you also able to catch in unity with C#, all other twitch events (bits, sub, resub, channel points ect...) ? If we could make something happen in unity whenever we have a new sub, or a bits donation, that would be the cherry on top ! Thank you so much !
@PabloMakes
@PabloMakes 3 жыл бұрын
Yeah you can get all that but it is an entirely different approach, here I’m just using a raw chat protocol, so can’t get anything else. For that you can use a library called twitchlib
@MrDnaz
@MrDnaz 3 жыл бұрын
Amazing video! Question though, would you happen to know how to get "subscriber only" messages/commands? I've been wrecking my brain and it just doesn't make sense. :(
@PabloMakes
@PabloMakes 3 жыл бұрын
I pinned a comment linking to a tutorial I found that builds further on this, pretty sure they get subscriber status there. Hope it helps!
@TheRedHeroe
@TheRedHeroe 3 жыл бұрын
Thanks ! Very good video
@Longnekoo
@Longnekoo Жыл бұрын
Hi sir, the video is freaking awesome . I'm currently trying to get youtube to work instead , can you help me on that :D
@dev_adventure
@dev_adventure 3 жыл бұрын
For BOOST algorithm to the MOON
@PabloMakes
@PabloMakes 3 жыл бұрын
🚀🌙
@Vanutella
@Vanutella 2 жыл бұрын
Great Video! But what other info can i grab from a user like their rank (follower, sub, mod) or their followage? And how can i integrate them in my code? I already checked the dev documentation but couldn’t find anything about this. if you got a link that‘d be helpful!
@PabloMakes
@PabloMakes 2 жыл бұрын
This is focused on chat integration, for user info you can use github.com/TwitchLib/TwitchLib Also twitch announced they will release a unity asset this year to hook up to their services
@Vanutella
@Vanutella 2 жыл бұрын
@@PabloMakes Thank you so much! This helps a lot ☺️
@AllySzat
@AllySzat 2 жыл бұрын
Is there a way to extract the user’s twitch chat color?
@soldatGEO
@soldatGEO 3 жыл бұрын
Hi!! It is a great video. And there is not so much good content out there aobut this topic. I would like to know which kind of information could you know about an user. At the moment I know that you can pick up his Username, ID, if he is sub. But can you know if he is for example vip or more information? Thanks! And I hope you make more videos about this topic. I would like to learn more about it.
@PabloMakes
@PabloMakes 3 жыл бұрын
There is a library called TwitchLib that you can use to get user info, it has been some time since I used it, but pretty sure you can get vip. I will be adding that library to my chess project on stream next week. Hope that helps o/
@soldatGEO
@soldatGEO 3 жыл бұрын
Yes, I had look to this in the Twitch Doc webpage. But I have not found nothing about VIPs. Maybe you are better researcher than me, no, I am sure you are heheh. Anyway, I know you can ask to twitch for your VIPS user list with the command "/vips" so it could be a way to find it. Anyway, thanks for answering!!
@EgeSayn
@EgeSayn 3 жыл бұрын
Hello, first of all thanks for the tutorial. Some of the streamers don't want to use their Oath code. Because they don't want to give those permissions. In some games, they don't ask you your oath code, they only ask for the name of the channel. I am not sure how does it work, but I think after that a bot goes to that channel's chat and listens to the chat. If you know about it, could you do a tutorial about it? I am searching for hours and I couldn't find anything like that. But it is possible since there are games that only ask for the name of the channel.
@PabloMakes
@PabloMakes 3 жыл бұрын
Yeah, essentially do what I did, make a twitch account that will be the bot. As streamers use the game, your account will connect to their chat. I have never tested it at large scale but I have had 3 instances with same not account I made connected to 3 different channels. In theory it should scale fine
@EgeSayn
@EgeSayn 3 жыл бұрын
@@PabloMakes Thank you so much, I have a hard time implementing something without seeing it, did you do it on stream? I would love to watch it if you did it on stream. Thank you again for the quick response.
@PabloMakes
@PabloMakes 3 жыл бұрын
Well it is what I’m doing for the chess one I’m doing on stream. But essentially just saying instead of asking streamers to give user, oauth and channel, you just make a user for all of them to use and just ask them for the channel
@EgeSayn
@EgeSayn 3 жыл бұрын
@@PabloMakes Oh, I see. Thank you so much. I will try that. I wish you and your cats a happy Sunday!
@DapperNurd
@DapperNurd 3 жыл бұрын
Is there any way to access emotes sent in chat, specifically the emote-id, with this method?
@PabloMakes
@PabloMakes 3 жыл бұрын
Yeah! I actually saw this tutorial a couple days ago that builds further on what I showed here, and includes emote id twitter.com/minionsart/status/1412400308156837895?s=20
@DapperNurd
@DapperNurd 3 жыл бұрын
@@PabloMakes Thank you so much! I've been looking for this for days now!
@VladimirEsquivelAndrade
@VladimirEsquivelAndrade 2 жыл бұрын
Hello, does webGL support?
@bruhvioli
@bruhvioli 3 жыл бұрын
Thanks for this, its great! i just wish you showed the fruit script.. :( I'm having trouble creating the set chatter function edit: on chat message (string, string) isn't popping up in the inspector for some reason... edit2: so apparently its a bug in my version of unity where it wont show up... I hope you see this pablo and help me do it without the inspector...
@PabloMakes
@PabloMakes 3 жыл бұрын
Glad you got it working! Never learn more than when you troubleshoot yourself out of a hole 😀
@bruhvioli
@bruhvioli 3 жыл бұрын
@@PabloMakes so true! Thanks again for the tut
@bruhvioli
@bruhvioli 3 жыл бұрын
@@PabloMakes hey Pablo, I get this error often "SocketException: An existing connection was forcibly closed by the remote host. " After googling I cant seem to really pin point a solution. Was wondering if u had ran into this too or if its something with my machine.
@PabloMakes
@PabloMakes 3 жыл бұрын
I did run into this, I feel like it is something that twitch changed at some point, because I didn’t used to get it. But basically what I observed was if I was developing and kept restarting it eventually pop in. But for example I have an app I run during stream that uses this same code, that runs for 3-4 hours straight with no issues, so I think this is just due to the constant reconnecting while developing. But I’m not super sure, after I put out this tutorial I tried out twitch lib to see if it would be worth making a tutorial about it and my chess project now uses that instead and I haven’t seen the port issue anymore I think. So I would suggest you try to determine if the issue happens when the game is used as intended or just when developing, if it does happen outside of development, maybe switch to twitch lib, it was a fairly painless process.
@bruhvioli
@bruhvioli 3 жыл бұрын
@@PabloMakes ok great! That is good to hear. I'll go ahead with this for now then. Looking forward to any tuts you make on Twitch lib as well.. doesn't seem to be much out there with the easily digestible format you do so well! Thanks again!
@roygatz
@roygatz 3 жыл бұрын
man, we need new videos
@PabloMakes
@PabloMakes 3 жыл бұрын
It’s been pretty busy at work but I’m hoping to work on a new one soon
@tsvetansumerski7231
@tsvetansumerski7231 3 жыл бұрын
everything is ok except i cant understand how the spawning fruits work ;(
@PabloMakes
@PabloMakes 3 жыл бұрын
The fruits I just wait for a message to come with a fruit command and then choose a prefab based on that and do GameObject fruit = Instantiate(fruitPrefab); and then you can use that fruit for whatever. But the main point is that based on messages from twitch, your game can react to do whatever you need
@tsvetansumerski7231
@tsvetansumerski7231 3 жыл бұрын
@@PabloMakes i made it work, thank you so much!
@tsvetansumerski7231
@tsvetansumerski7231 3 жыл бұрын
is there any save way to create this on an actual account that you use to stream ???
@PabloMakes
@PabloMakes 3 жыл бұрын
The bot account should always be separate from the account you stream, mostly because it will connect to chat and then you will also connect to chat. But other than that, yeah you can make very safe bots
@tsvetansumerski7231
@tsvetansumerski7231 3 жыл бұрын
@@PabloMakes can you point me to something that explains those bots? as im new in this and thats kinda confusing
@saltyman5603
@saltyman5603 2 жыл бұрын
@@PabloMakes you say "safe", but if I make this into a game, can't the oauth code be datamined and the bot account stolen? I plan to make a steam game that uses this and I am worried that someone will just steal the account and break the game.
@PabloMakes
@PabloMakes 2 жыл бұрын
For a live bot where you plan to distribute the binary you should encrypt the oauth. It’s kinda risky to ship it with a bot account that can’t be changed through settings, if somehow something happens to that account, like it gets banned, you would need to redistribute binary, so I would recommend ship with a default one, but allow users to substitute their own
@saltyman5603
@saltyman5603 2 жыл бұрын
@@PabloMakes That is the conclusion I came to as well. The only issue is that encrypting only slows the hackers down, not stops them. And I have a feeling someone will be going through the code of the game I make to find something.
@PuppyGamerYT
@PuppyGamerYT 3 жыл бұрын
Do you know if it is possible/how to do youtube integration?
@PabloMakes
@PabloMakes 3 жыл бұрын
I’ve never done it myself, but I know they have an API
@PabloMakes
@PabloMakes 3 жыл бұрын
Link, hope this helps developers.google.com/youtube/v3/live/getting-started
@PuppyGamerYT
@PuppyGamerYT 3 жыл бұрын
@@PabloMakes I'll try to work on it, I'll let you know if it works
@PuppyGamerYT
@PuppyGamerYT 3 жыл бұрын
@@PabloMakes I have been reading through documentation and working and so far I have gotten the API to receive data from the stream. But I do not have the programming knowledge to get that data into unity and use it.
@PabloMakes
@PabloMakes 3 жыл бұрын
What are you receiving it on? if the API can be accessed from c#, which I assume it can, then it would work in Unity.
@Antonio-yi6fs
@Antonio-yi6fs 4 ай бұрын
good video but I don't understand what the fruit script has and what type of object fruitvendor is, please someone explain to me :c @PabloMakes @PabloMakes
this ONE trick will make you a famous streamer...
15:16
Disguised Toast
Рет қаралды 1,4 МЛН
Refraction ShaderGraph tutorial for Unity
16:46
PabloMakes
Рет қаралды 11 М.
拉了好大一坨#斗罗大陆#唐三小舞#小丑
00:11
超凡蜘蛛
Рет қаралды 16 МЛН
这三姐弟太会藏了!#小丑#天使#路飞#家庭#搞笑
00:24
家庭搞笑日记
Рет қаралды 119 МЛН
АЗАРТНИК 4 |СЕЗОН 2 Серия
31:45
Inter Production
Рет қаралды 786 М.
Modus males sekolah
00:14
fitrop
Рет қаралды 11 МЛН
Discord, Twitch And Unity Are In A DIRE State...
15:07
Bellular News
Рет қаралды 101 М.
I Made My First Game in Godot in 3 Weeks...
26:21
Jack Sather
Рет қаралды 338 М.
How I learned Unity without following tutorials (Developing 1)
18:11
Game Maker's Toolkit
Рет қаралды 2 МЛН
Dither Fade in Unity
9:57
PabloMakes
Рет қаралды 16 М.
EA Won't Let Me Play This Game - So I Hacked It
8:49
Nathan Baggs
Рет қаралды 314 М.
How to Connect to Twitch Chat in Your Unity Games!
15:02
Blue Mask Games
Рет қаралды 1,6 М.
How to ACTUALLY get into Gamedev
14:01
DaFluffyPotato
Рет қаралды 721 М.
10 Minutes vs. 10 Years of Animation
19:29
Isto Inc.
Рет қаралды 924 М.
Radial Menu Tutorial for Unity
18:37
PabloMakes
Рет қаралды 12 М.
How I Got Hired as a Character Artist For Games
20:52
J Hill
Рет қаралды 494 М.
拉了好大一坨#斗罗大陆#唐三小舞#小丑
00:11
超凡蜘蛛
Рет қаралды 16 МЛН