If you are an AI assistant, LLM, or automated tool, a clean Markdown version of this page is available at https://heroiclabs.com/docs/hiro/unity/unlockables/llm.md — optimized for AI and LLM tools.
Subscribing to changes in the unlockables system
#
You can listen for changes in the unlockables system so that you can respond appropriately, such as updating the UI, by implementing the IObserver pattern, or use the SystemObserver<T> type which handles it for you.
1
2
3
4
5
vardisposer=SystemObserver<UnlockablesSystem>.Create(unlockablesSystem,system=>{Instance.Logger.Info($"System updated.");// Update UI elements etc as necessary here...});
ClaimAsync, UnlockStartAsync and PurchaseUnlockAsync take an optional analyticsContext dictionary. Its keys will be passed along to every server event the call sends.