InputStateExtFindFirstHeld Method (InputState, IEnumerableInputCode) |
[This is preliminary documentation and is subject to change.]
Namespace: RavingBots.MultiInput
public static IDevice FindFirstHeld( this InputState state, IEnumerable<InputCode> axes )
var state = FindObjectOfType<InputState>(); var axes = new List<InputCode> { InputCode.PadLeftTrigger, InputCode.PadRightTrigger }; var device = state.FindFirstHeld(axes); if (device != null) { Debug.LogFormat("Found held trigger on device {0}", device.Name); } else { Debug.LogFormat("Held trigger not found"); }