[BUG] Reward redemption UserInput text is always empty.
When reading UserInput field of a CustomRewardEvent, the UserInput field is always empty.
[code]
using UnityEngine;
using TwitchSDK;
using TwitchSDK.Interop;
public class SomeScript03 : MonoBehaviour
{
GameTask<EventStream<CustomRewardEvent>> reward01;
async void Start()
{
reward01 = Twitch.API.SubscribeToCustomRewardEvents();
await reward01;
}
async void Update()
{
if(Input.GetKeyDown(KeyCode.Alpha1))
{
if(reward01.MaybeResult != null)
{
CustomRewardEvent rwd01_event;
if(reward01.MaybeResult.TryGetNextEvent(out rwd01_event))
{
Debug.Log($"Name:{rwd01_event.CustomRewardTitle} | Text:{rwd01_event.UserInput}");
}
}
}
}
}
[/code]
Attach this script to a gameobject and enter Play Mode. Make sure you have a Custom Reward that takes user input. Redeem the reward and provide some user input to it. Then press the 1 key and the Console will show a message with the reward title and the user input text. The text is always blank.
1
vote
abhinav_demkeys
shared this idea