GetButtonUp

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

Description

using UnityEngine;
using Volplane;

public class Demo : VolplaneBehaviour
{
    public int playerId;

    void Update()
    {
        if(VInput.GetButtonUp(playerId, "myButton"))
        {
            Debug.Log("Button released!");
        }
    }
}

Returns true during the frame the user releases the button identified by its element name. You need to call this method from the Update function, since the state gets reset each frame. It will not return true until the player has pressed the button and released it again.

 

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