QueueEvent from Thread throws Exception

Hey,
I am currently setting up a custom device and I would like to queue the device state from a background thread

According to the documentation:
“Queueing an input event is thread-safe, which means that event generation can happen in background threads.”

However if i try to queue an event in a thread I run into this exception:

I tried several methods including InputSystem.QueueEvent, InputSystem.QueueStateEvent, State.From …
All of them throw this UnityException.

The documentation says it should work, so am I missing somthing here?

1 Like

Any news regarding this?

I’m hitting the same problem trying to Queue a StateEvent from a different thread.

Shimmer3DeviceState state = new Shimmer3DeviceState() { };
UnityEngine.InputSystem.InputSystem.QueueStateEvent(Shimmer3InputDevice.current, state);

If I supply a Timestamp to QueueStateEvent() then the exception is for QueueStateEvent and not get_currentTime.

This looks like a bug as calling it from a different thread should work. We’d really appreciate a bug report via Help → Report a bug in the Unity editor.

Hello everyone, follow the progress for this bug at:

1 Like