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
- Editor crash on "PPtr<Shader>::operator Shader*() const" when checking in changes with a very long comment in Unity Version Control window
- [Ubuntu] Toolbar and menu items for Version Control lack spaces in text on Linux
- Unity Version Control window Pending Changes tab’s Item checkbox is unresponsive when clicked and the item list is empty
- Audio stuttering occurs when heavy processing is performed while OnAudioFilterRead is in use
- Inconsistent Node search results in VFX Graph
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.