OnStateChange

public event Action<bool> OnStateChange;

Description

using UnityEngine;
using Volplane;

public class Demo : VolplaneBehaviour
{
    void OnConnect(VPlayer player)
    {
        // Register event
        player.OnStateChange += PlayerStateChanged;
    }

    // Event handler
    void PlayerStateChanged(bool active)
    {
        if(active)
        {
            Debug.Log("Player is now active!");
        }
        else
        {
            Debug.Log("Player is now inactive!");
        }
    }
}

Occurs when player state changes (active or inactive). The boolean parameter indicates if a player state changed to active (true) or inactive (false).