…r the Input System wouldn't affect feature flags.
Description
The optimization flags within InputSettings were stored as static fields for performance reasons. This makes little sense from API perspective where these are set and evaluated using a non-static API. This also leads to switching InputSettings instance having no impact on current settings. As long as these are exposed via this API they should not be static. However, I added extraction of the settings into InputManager which is represented by a static and used direct access from where its used so expecting little if any impact.
Adressing:
Feature flags set and checked via InputSettings non-static interface but backed by static variables.
Changes made
Changed flags to be extracted in Input Manager instead when settings change.
Removed custom handling in InputSettings which allow IsFeatureEnabled to work.
Added 1 test case for scenario Settings_ShouldStoreSettingsAndFeatureFlags(string featureName). I didn't add a new test category at this point since none of the existing fits well so I left the test case uncategorised.
Risk
Potential risk is features not being enabled correctly for some corner-case scenarios.
Checklist
Before review:
[x] Changelog entry added.
Explains the change in Changed, Fixed, Added sections.
For API change contains an example snippet and/or migration example.
JIRA ticket linked, example (case %%). If it is a private issue, just add the case ID without a link.
…r the Input System wouldn't affect feature flags.
Description
The optimization flags within InputSettings were stored as static fields for performance reasons. This makes little sense from API perspective where these are set and evaluated using a non-static API. This also leads to switching InputSettings instance having no impact on current settings. As long as these are exposed via this API they should not be static. However, I added extraction of the settings into InputManager which is represented by a static and used direct access from where its used so expecting little if any impact.
Adressing:
Changes made
Note that this fix also includes https://github.com/Unity-Technologies/InputSystem/pull/1955 since the test case would otherwise fail with debug error log on non Windows platforms.
Testing
Added 1 test case for scenario
Settings_ShouldStoreSettingsAndFeatureFlags(string featureName)
. I didn't add a new test category at this point since none of the existing fits well so I left the test case uncategorised.Risk
Potential risk is features not being enabled correctly for some corner-case scenarios.
Checklist
Before review:
Changed
,Fixed
,Added
sections.Area_CanDoX
,Area_CanDoX_EvenIfYIsTheCase
,Area_WhenIDoX_AndYHappens_ThisIsTheResult
.During merge:
NEW: ___
.FIX: ___
.DOCS: ___
.CHANGE: ___
.RELEASE: 1.1.0-preview.3
.After merge: