Scripting API

Framework Classes

using UnityEngine;
using Volplane;

public class Demo : VolplaneBehaviour
{
    // Basic usage...
}

VolplaneBehaviour again inherits from MonoBehaviour so you can make use of all Unity specific functionality.

VolplaneBehaviour
From the abstract VolplaneBehaviour class the entire functionality of the framework can be accessed. Methods with a specific name will be bound to events indicating various AirConsole actions. There can be multiple instances inheriting from this behaviour.

VInput
Inputs from your players through their controllers are managed in the static VInput class. It provides various methods for handling player inputs.

VPlayer
Player specific and user related interaction can be performed through VPlayer objects. Every AirConsole device is bound to an object.

ElementProperties
A container class for element properties that can be applied to a controller element.

Access AirConsole API

using UnityEngine;
using Volplane;

public class Demo : MonoBehaviour
{
    void Start()
    {
        // Register AirConsole 'onConnect' event directly
        VolplaneController.AirConsole.OnConnect += OnDeviceConnect;
    }

    void OnDeviceConnect(int deviceId)
    {
        Debug.LogFormat("Device with id: {0:D} connected!");
    }
}

VolplaneController.AirConsole is a static AirConsoleAgent object acting as agent between the Unity 3D and the AirConsole API. It represents a C# wrapper of the AirConsole API, practically like the AirConsole Unity plugin.

You can access functions from the AirConsole API directly. The VolplaneController class has a static AirConsoleAgent object which represents an .Net/Mono wrapper of the AirConsole API.