GetButton

public static bool GetButton(int playerId, string elementName);
public static bool GetButton(VPlayer player, string elementName);

Description

using UnityEngine;
using Volplane;

public class Demo : VolplaneBehaviour
{
    public int playerId;
    public float speed;

    void Update()
    {
        // Move transform up while holding the button 'myButton'
        if(VInput.GetButton(playerId, "myButton"))
        {
            transform.position += Vector3.up * Time.deltaTime * speed;
        }
    }
}

Returns true for every frame the user touches the specified button - Think auto fire.

 

playerId The player identifier.
player A player object.
elementName The name identifier of the input element set in the controller editor.