void PrintButton(XRControllerButton button, string name) { if (button.down) { Debug.Log(name + " down"); } if (button.up) { Debug.Log(name + " up"); } }
internal void Merge(ref XRControllerButton button) { if (on) { button.on = true; } if (down) { button.down = true; } if (up) { button.up = true; } }
private static void TestButtonEvent(ButtonEvent onEvent, ButtonEvent downEvent, ButtonEvent upEvent, ref XRControllerButton button, XRControllerSide side) { if (onEvent != null && button.on) { onEvent(side); } if (downEvent != null && button.down) { downEvent(side); } if (upEvent != null && button.up) { upEvent(side); } }