OnButton

Description

using UnityEngine;
using Volplane;

public class Demo : VolplaneBehaviour
{
    void OnButton(int playerId, string elementName, bool state)
    {
        Debug.LogFormat(
            "Player {0:D} has pressed button '{1:G}' ({2:F}).",
            playerId,
            elementName,
            state
        );
    }
}

Gets called when a button input on a players controller is registered. See VInput for a more common input handling.

 

playerId The player identifier.
elementName The name identifier of the registered button element.
state Boolean indicating the state of the button.