Search Unity

Bug Device front buffer retains old data in editor

Discussion in 'Input System' started by vxdcxw, Nov 22, 2022.

  1. vxdcxw

    vxdcxw

    Joined:
    Mar 21, 2014
    Posts:
    15
    I'm struggling with a bug with the package which make hard to use play-in-editor when the package is enabled.

    The issue happens whenever there is a lag spike for whatever reason (domain reload, saving asset, script compilation). The device front buffer is not cleared when it should because the input system may have missed the release event of the input or... was too slow to update?

    The most common way to reproduce the issue is to save the scene with CTRL-S when saving a large scene on a project with lot of assets and assemblies. Looking at the state frame will display the buffer to be cleared (only zeros), but on next input event, some bits are restored and they won't be cleared until I trigger an event that will change those specific bits.

    I tried to find a fix by digging into the package but didn't succeeded.

    Does someone have an idea on how to fix it? I haven't been able to detect if it concerns editor only or in-build too, but when the state frame have some wrong bits when play-in-editor is started, the inputs will be readen positive by input system and move the camera/UI and stuff.

    On Unity 2021.2.12f1 with package 1.4.4, on Linux (Arch) system.