Today’s issue
Occasionally, the server will either miss a client’s input, or process it twice on sequential frames. Missing input occurs perhaps 10% of the time a button is pressed. Double sequential processing much less (1-2%?). The code is very simple, so I can’t see what I’m doing wrong.
ReadHeroInputSystem, running in GhostInputSystemGroup:
- Set input data to default.
- If a button was pressed, set an input event and an int bitfield value.
UpdateHeroAbilityButtonsSystem, running in PredictedSimulationSystemGroup:
- If bitfield contains specific flag, process input.
This is a log screenshot when everything works as expected.
This screenshot is when the input is missed.
Also, I’ve just also created a log where I check the input event if the bitfield is 0 - the input event IsSet is true, but none of the other fields have values (reset to default). This input event is 100% not being set from anywhere except when also setting the button data.
Is there special handling of InputEvent fields that could/should also be applied to regular fields?
There’s no fancy shenanigans or whatever occurring in the code around these systems, it’s pretty much as straightforward as possible.
Note that the client is connected via IPC, and I’ve disabled local prediction (due to the other issues I’ve reported).
Unity 2022.3.23
DOTS: 1.2.1
(this is reproducible in the uploaded project for support ticket #1851449)