You can listen for changes in the incentives system so that you can respond appropriately, such as updating the UI, by implementing the appropriate interface.
1
2
3
4
5
vardisposer=SystemObserver<IncentivesSystem>.Create(incentivesSystem,system=>{Instance.Logger.Info($"System updated.");// Update UI elements etc as necessary here...});
varincentivesLists=awaitincentivesSystem.SenderList();foreach(varincentiveinincentivesList){foreach(var(key,value)inincentive.Claims){Debug.Log($"{key} claimed at {value.ClaimTimeSec}.");}foreach(varuserIdinincentive.UnclaimedRecipients){Debug.Log($"{userId} has not yet claimed.");}}
varincentiveId="<incentiveId>";varincentive=awaitincentivesSystem.SenderCreate(incentiveId);Debug.Log($"Created incentive with code: {incentive.Code}");