Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Question InputSystem.QueueDeltaStateEvent for bitfield

Discussion in 'Input System' started by pajamajama, Dec 2, 2022.

  1. pajamajama

    pajamajama

    Joined:
    Oct 22, 2012
    Posts:
    64
    I have a custom device/layout. My button states are stored in a ushort bitfield.
    InputSystem.QueueDeltaStateEvent throws an error.
    Is there a workaround? Thanks much!

    [InputControl(name = "buttonA", layout = "Button", bit = 0)]
    [InputControl(name = "buttonB", layout = "Button", bit = 1)]
    public ushort buttons;


    InvalidOperationException: Cannot send delta state events against bitfield controls: Button:/AxisOrangeInputDevice/buttonB