Twitch integration with Unity Tutorial

Поділитися
Вставка
  • Опубліковано 6 лис 2024

КОМЕНТАРІ • 97

  • @PabloMakes
    @PabloMakes  3 роки тому +7

    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 роки тому +16

    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 Рік тому +1

    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 роки тому +1

    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 роки тому +1

    I watch my fair share of tutorials, and this was well done in every single respect. Stellar work. Subbed!

  • @slightlyniceron
    @slightlyniceron 3 роки тому +2

    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 роки тому +1

      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. :)

  • @prayagsahu4445
    @prayagsahu4445 3 роки тому +1

    bro tutorials are great , keep on making 🔥🔥🔥 everytime i watch i learn something new ❤️❤️

    • @PabloMakes
      @PabloMakes  3 роки тому +1

      Thanks! Glad you enjoyed them, need to make time to make more 😅

  • @Kishy
    @Kishy 3 роки тому +2

    I love your tutorials, thank you so much for these! The quality is great and the explanations are easy to understand

    • @PabloMakes
      @PabloMakes  3 роки тому +1

      Thanks a lot for your comment. It lifted my spirits

    • @Kishy
      @Kishy 3 роки тому

      @@PabloMakes I'm really glad to hear! c:

  • @subbu6572
    @subbu6572 3 роки тому +2

    wow dude this is a really fun functionality. thanks.

  • @AflorAStudios
    @AflorAStudios 3 роки тому +1

    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 роки тому +1

      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 UA-cam just to keep a history.

  • @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 ™️

  • @BrandonFerrentino
    @BrandonFerrentino Рік тому

    Underrated channel.

  • @shreckgaming-clashroyale1896
    @shreckgaming-clashroyale1896 3 роки тому

    Very wholesome underrated content.

  • @schwarzenego
    @schwarzenego 2 роки тому

    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?

  • @Ha1wen
    @Ha1wen Рік тому

    Thank you so much! Great tutorial, great explanation, great video in general. Works like a charm!

  • @ian4599
    @ian4599 3 роки тому

    This is so underated. Thanks Pablo!

  • @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!

  • @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 роки тому +2

      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!

  • @Gabykk
    @Gabykk 3 роки тому

    Dude that's so smooth.

  • @roygatz
    @roygatz 3 роки тому

    This is a great video Pablo

  • @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.

  • @joewannimozzarella
    @joewannimozzarella 2 роки тому +1

    Hey, can you maybe do a tutorial on how my game can interact with raids and follows?

  • @chickenmission9156
    @chickenmission9156 Рік тому

    amazing tutorial

  • @VishalSiddireddy
    @VishalSiddireddy 3 роки тому

    This looks really cool!

  • @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 роки тому +1

      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 ☺️

  • @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

  • @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

  • @VladimirEsquivelAndrade
    @VladimirEsquivelAndrade 2 роки тому

    Hello, does webGL support?

  • @AllySzat
    @AllySzat 2 роки тому

    Is there a way to extract the user’s twitch chat color?

  • @CraftyMCFish
    @CraftyMCFish 2 місяці тому

    Thanks so much!

  • @NevaranUniverse
    @NevaranUniverse 3 роки тому

    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  3 роки тому

      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 3 роки тому

      @@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.

  • @TheRedHeroe
    @TheRedHeroe 3 роки тому

    Thanks ! Very good video

  • @dev_adventure
    @dev_adventure 3 роки тому

    For BOOST algorithm to the MOON

  • @DapperNurd
    @DapperNurd 3 роки тому

    Is there any way to access emotes sent in chat, specifically the emote-id, with this method?

    • @PabloMakes
      @PabloMakes  3 роки тому +1

      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 роки тому +1

      @@PabloMakes Thank you so much! I've been looking for this for days now!

  • @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.

  • @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 3 роки тому

      @@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  3 роки тому

      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 3 роки тому

      @@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.

  • @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!

  • @ToonzGamers
    @ToonzGamers 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 роки тому +1

      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/

    • @ToonzGamers
      @ToonzGamers 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!!

  • @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

  • @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

  • @tsvetansumerski7231
    @tsvetansumerski7231 3 роки тому

    everything is ok except i cant understand how the spawning fruits work ;(

    • @PabloMakes
      @PabloMakes  3 роки тому +1

      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!

  • @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 роки тому +1

      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 роки тому +1

      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!

  • @Antonio-yi6fs
    @Antonio-yi6fs 6 місяців тому

    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