Event Examples
Events - Action/Delegates
Synchronous - Normal way of doing events
using System;
using UnityEngine;
using VivoxUnity;
public class NormalEvents : MonoBehaviour
{
public event Action<ILoginSession> LoggingIn;
void Start()
{
LoggingIn += PlayerLoggingIn;
}
private void OnApplicationQuit()
{
LoggingIn -= PlayerLoggingIn;
}
public void PlayerLoggingIn(ILoginSession loginSession)
{
Debug.Log($"Invoking Normal Event from {nameof(PlayerLoggingIn)}");
}
}
Synchronous - Easy Code way of doing events
Easy Code Dynamic Events
Synchronous - Dynamic Events
Asynchronous - Dynamic Async Events
Last updated