Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
rleinfellner's avatar
rleinfellner
Honored Guest
6 years ago

Button.One not working on Unity via Oculus Link, works fine in build

All the buttons work other than Button.One when using Link to make Unity game, if the code is deployed to the Quest all the buttons work, so probably an issue with Unity interface.


Test code, outputs a uint32 bitmask, when run inside Unity via Link (Beta) will not give Button.One (00000001) but works fine when deployed.


    uint AllButtons()
    {
        uint tResult = 0;
        for (int i = 0; i < 32; i++)
        {
            OVRInput.Button tMask = (OVRInput.Button)((uint)1 << i);
            tResult |= (OVRInput.Get(tMask, mControllerHelper.m_controller) ? (uint)1 : (uint)0) << i;
        }
        return tResult;
    }