State

public VPlayer.PlayerState State;

Description

using UnityEngine;
using Volplane;

public class Demo : VolplaneBehaviour
{
    private VPlayer p;

    void OnConnect(VPlayer player)
    {
        // Store newly connected player object
        if(p == null)
            p = player;
    }

    void Update()
    {
        if(p != null)
        {
            // Check player state
            switch(p.State)
            {
                case VPlayer.PlayerState.WaitingForAd:
                    Debug.Log("Player is waiting for ad to complete!");
                    break;

                case VPlayer.PlayerState.Pending:
                    Debug.Log("Player has lost connection!");
                    break;

                case VPlayer.PlayerState.Inactive:
                    Debug.Log("Player is set inactive!");
                    break;

                default:
                    Debug.Log("Player is active!");
                    break;
            }
        }
    }
}

Gets the current player state. This method returns an option from the VPlayer.PlayerState enumerator.