Search Issue Tracker
By Design
By Design in 2023.3.X
Votes
1
Found in
2023.1.7f1
2023.2.0b3
2023.3.0a1
Issue ID
UUM-44707
Regression
No
Serialized Key Code type fields are changed to a different type than the set ones
How to reproduce:
1. Open the user’s attached “TestInputBug.zip” project
2. In the Hierarchy window, select “GameObject” GameObject
3. In the Inspector window, observe the Key Codes of the elements
Expected result: Key Codes are: “Mouse 0”, “Mouse 1”, “Print”
Actual result: Key Codes are: “Print”, “Sys Req” and “Left Windows”
Reproducible with: 2021.3.29f1, 2022.2.20f1, 2023.1.0a1, 2023.1.7f1, 2023.2.0b3
Not reproducible with: 2022.3.0f1, 2022.3.6f1
Fixed in: 2022.2.21f1
Reproduced on: macOS 13.4.1 (Intel)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Required SpriteMask class (ID 331) is stripped when "Strip Engine Code" is enabled
- “Maximized serialized file backup not found” error is thrown when minimizing a window in a newly opened project
- Build stack trace contains invalid lines when building with IL2CPP using scripts with delegates containing generic types in the signature
- Entities Systems window has a “Show Full Player Loop” dropdown which does nothing when clicked after enabling “Show Full Player Loop”
- Entities Hierarchy Search “Show/Hide” button’s Lens Icon is blurry when the Editor is on an external monitor
Resolution Note:
The data in the repro project's scene seems to be wrong. For example, KeyCode.Mouse0=323, but in SampleScene.unity, the serialized value says "keyCode: 316".
The only explanation I can provide is that some older versions of Unity have a bug that will make them save a scene with the wrong values in it. All recent official releases of Unity will save their data correctly. Unfortunately, scenes saved with wrong data can't be fixed automatically by upgrading to a more recent version of Unity that doesn't have the bug.
Resolution Note (2023.3.X):
The data in the repro project's scene seems to be wrong. For example, KeyCode.Mouse0=323, but in SampleScene.unity, the serialized value says "keyCode: 316".
The only explanation I can provide is that some older versions of Unity have a bug that will make them save a scene with the wrong values in it. All recent official releases of Unity will save their data correctly. Unfortunately, scenes saved with wrong data can't be fixed automatically by upgrading to a more recent version of Unity that doesn't have the bug.