Unity-Technologies / InputSystem

An efficient and versatile input system for Unity.
Other
1.43k stars 310 forks source link

FIX: ISXB-953 InputSystemProvider GC Alloc #1973

Closed benoitalain closed 2 months ago

benoitalain commented 2 months ago

Description

Jira ticket: https://jira.unity3d.com/browse/ISXB-953

Fixes memory allocated every frame when using InputForUI with InputSystem package, i.e. when using a UIDocument without an EventSystem.

Changes made

Testing

Manually tested the repro project profiler evidence, and the fix. Added a unit test.

Risk

Very low risk. Change is a one-liner, simple and only has a local impact.

Checklist

Before review:

During merge:

After merge: