Skip to content
Translate Ideas and Comments
Choose language:
There was an error during translation

Settings and activity

5 results found

  1. 12 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    An error occurred while saving the comment
    abhinav_demkeys commented  · 

    I'm not sure if I should be adding this here or creating a new post for this but it's relating to SubscribeToCustomRewardEvents() so I'm gonna post it here and hope one of the devs sees it. In my original post I mentioned "SubscribeToCustomRewardEvents() is a member of 'Twitch.API'. So it should be 'Twitch.API.SubscribeToCustomRewardEvents()'.". This is true, however, in order to receive any events, you need to create an instance of TwitchSDKApi and call SubscribeToCustomRewardEvents() from that instance. Just calling 'Twitch.API.SubscribeToCustomRewardEvents()' doesn't give you any redeems. Sorry about the confusion. Here's my suggested version.

    TwitchSDKApi api;
    GameTask<EventStream<CustomRewardEvent>> customRewards;

    void Start()
    {
    api = new TwitchSDKApi(""); // Add your own ClientID here.
    customRewards = api.SubscribeToCustomRewardEvents();
    }

    void Update()
    {
    // If the 1 key is pressed.
    if(Input.GetKeyDown(KeyCode.Alpha1))
    {
    CustomRewardEvent curReward;
    // TryGetNextEvent returns a bool so we can use it
    // in a if condition.
    if(customRewards.MaybeResult.TryGetNextEvent(out curReward))
    {
    Debug.Log(curReward.CustomRewardTitle);
    }
    }
    }

    abhinav_demkeys shared this idea  · 
  2. 18 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    abhinav_demkeys supported this idea  · 
  3. 4 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    abhinav_demkeys shared this idea  · 
  4. 26 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    abhinav_demkeys supported this idea  · 
  5. 2 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    abhinav_demkeys shared this idea  ·