InputSystem
InputSystem copied to clipboard
FIX: ISX-1890 + Improved asset management in Input Action Asset editors
Description
This branch introduces improved asset management of .inputactions files open in editors and fixes a bug where pressing Save Asset in Input Action Editor window would throw an exception if the file was moved while the editor was being open. For details on changes introduced see Changes made below.
Changes made
The following changes have been made to this branch:
Test related changes:
- Added
AssetDatabaseUtils.cs
which simplifies writing test cases involving assets since it removes the burden from the developer to find unique file and directory names as well as automatically cleans-up all associated files and folders as part of InputTestFixture teardown. - Corrected incorrect one-time test fixture setup and teardown in
CoreTest_ProjectWideActions.cs
which resulted in backup folder being left in /Assets after running tests. - Fixed test case
Editor_InputActionAssetManager_CanMoveAssetOnDisk
which was testing InputActionAssetManager monitoring of external file system changes but failed to move .meta files along with assets generating warnings in test runner. - Expanded test coverage of InputActionAssetManager significantly via tests called out in checklist below. This was done to support refactoring of the class with less worry about breaking existing behavior without improving it.
Notes
Recommended to cover during quality assurance:
- Copying, renaming, moving and deleting .inputactions assets from within editor with and without editors open.
- Copying, renaming, moving and deleting .inputactions assets from outside editor (OS) with and without editors open.
- Functional test of UITK Input Action Editor with respect to above and general functionality.
- Functional test of IMGUI Input Action Editor with respect to above and general functionality.
- Functional test of UITK Project Settings Input Action Editor with respect to above and general functionality.
Checklist
Before review:
- [ ] Changelog entry added.
- Explains the change in
Changed
,Fixed
,Added
sections. - For API change contains an example snippet and/or migration example.
- FogBugz ticket attached, example
([case %number%](https://issuetracker.unity3d.com/issues/...))
. - FogBugz is marked as "Resolved" with next release version correctly set.
- Explains the change in
- [ ] Tests added/changed, if applicable.
- Functional tests
Area_CanDoX
,Area_CanDoX_EvenIfYIsTheCase
,Area_WhenIDoX_AndYHappens_ThisIsTheResult
. - Performance tests.
- Integration tests.
- Functional tests
- [ ] Docs for new/changed API's.
- Xmldoc cross references are set correctly.
- Added explanation how the API works.
- Usage code examples added.
- The manual is updated, if needed.
During merge:
- [ ] Commit message for squash-merge is prefixed with one of the list:
-
NEW: ___
. -
FIX: ___
. -
DOCS: ___
. -
CHANGE: ___
. -
RELEASE: 1.1.0-preview.3
.
-