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
- URP Realtime reflection probes do not update when RenderProbe() is being called once per second
- Addressable terrain shader variants are stripped from the Player
- [iOS] Debug.Log() appears as <private> in Console app
- UI stays in the background when it is disabled in simulator
- A wrong log file is attached when project is launched with a "-logFile" command line argument
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.