Class VirooApi
public class VirooApi
- Inheritance
-
VirooApi
Properties
Instance
Gets the global singleton instance of VirooApi.
public static VirooApi Instance { get; }
Property Value
Remarks
The instance is lazily created on first access. This property never returns null.
Example:
bool virooApiInitialized = VirooApi.Instance.IsInitialized;
IsInitialized
Gets a value indicating whether the Viroo API has completed initialization.
public bool IsInitialized { get; }
Property Value
Events
OnInitialized
Occurs when the Viroo API has completed its initialization.
public event EventHandler OnInitialized
Event Type
Remarks
This event fires exactly once in the application lifetime. If the API is already initialized when a subscriber registers, the handler will be invoked immediately.
Use this event to safely access Viroo API modules during startup:
protected void Awake()
{
VirooApi.Instance.OnInitialized += OnVirooInitialized;
}
private void OnVirooInitialized(object sender, EventArgs e)
{
VirooApi.Instance.OnInitialized -= OnVirooInitialized;
// Rest of the code
}