Search Issue Tracker
By Design
Votes
0
Found in
6000.0.54f1
6000.1.14f1
6000.2.0b12
6000.3.0a3
6000.4.0a1
Issue ID
UUM-112845
Regression
No
Negative Enum value is not pasted correctly when copying from another array
How to reproduce:
1. Open the “IN-109456_EnumCopyBug“ project
2. Open the “SampleScene”
3. In the Hierarchy select “MyGameObject”
4. In the Inspector in “My Component” right-click the “Copy From” array and select “Copy”
5. In “My Component” right-click the “Copy To” array and select “Paste”
6. Observe the “Copy To” arrays “Element 0” value
Expected result: The value is “-5”
Actual result: The value is “0”
Reproducible with: 2023.2.0a11, 6000.0.54f1, 6000.1.14f1, 6000.2.0b12, 6000.3.0a3
Could not test with: 2023.2.0a10 (There is no option to copy the array)
Reproducible on: macOS 15.5 (M1 Max), Windows 10 (by user)
Not reproducible on: no other environments tested
Note: Did not reproduce with “int” array
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
- Out-of-bounds memory access with multiple CanvasRenderers under a Canvas when using Mesh API
- Inspector tries to access file after it was deleted when the file was locked in Inspector window
- Changing Transform values in Search window Inspector loses focus while dragging and stopping mouse without releasing dragging action
- Saving changes on the dirty VFX Graph during the Play mode throws "The referenced script (Unknown) on this Behaviour is missing!" warnings
- VFX Graph Debug Info overlaps the "Initialize" block debug info by default
Resolution Note:
Unity serializes enums as ints, but the Inspector UI maps them to the list of defined enum names.
On operations like Paste Component Values, if an enum’s stored int doesn’t correspond to a defined enum member, Unity normalizes it to the enum’s default (usually the first item = 0).
Negative values are fine only if they’re declared in the enum. An arbitrary -5 (not declared) is considered “invalid” and gets coerced to 0.