Search Issue Tracker
By Design
By Design in 6000.5.X
Votes
0
Found in
6000.0.58f1
6000.2.6f1
6000.3.0b4
6000.4.0a1
6000.5.0a1
Issue ID
UUM-120713
Regression
No
Duplicated items across all SerializedProperties when inserting a new element
Reproduction steps:
1. Open the attached project "ReproProj"
2. Open the “/Assets/Scenes/SampleScene.unity” Scene
3. Select the “Tester” GameObject on the Hierarchy
4. Look at the Inspector to perform the next steps
5. Click the Button with the text “Initialize” to prepare the test
6. Click the Button with the text “Insert Node At Last And Make Connections” to add the 1st node
7. Expand every foldout element in the Inspector
8. See that “Node Id 1” has 1 connection
9. Click the Button with the text “Insert Node At Last And Make Connections” to add the 2nd node
Expected result: Node ID 1 should have 2 connections, while Node ID 2 should have only 1 connection
Actual result: Both nodes have 2 connections
Reproducible with: 6000.0.58f1, 6000.2.6f1, 6000.3.0b4, 6000.4.0a1
Testing environment: Windows 10 Enterprise 21H2
Not reproducible on: No other environment tested
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
- Non-multisampled texture binding errors are logged when running the DepthBlit URP scene with MSAA enabled on Vulkan
- The Editor does not recognize code errors in generic classes when using C# Source Generator to generate serialization code
- NullReferenceException is logged when undoing Deletion of a Visual Query Block of a Search Expression
- “Unsupported type MinMaxCurve” error and “Could not register property modification for animation binding…” warnings are thrown after moving playhead when Particle System Property is added to Animation window
- Nested LocalizedStrings can not query local variables
Resolution Note:
Thank you for reporting a bug to Unity.
After reviewing the behavior, we've confirmed it aligns with the current design and intended use of the feature. We understand this may differ from your expectations or workflow.
We will close this case as 'As Designed.' If you have feedback on how the feature could better meet your needs, please let us know - we value your input and consider it in future improvements.
When a element is inserted into an array "The value of the inserted element is undefined and should be explicitly set after calling this function." from the documentation at https://docs.unity3d.com/ScriptReference/SerializedProperty.InsertArrayElementAtIndex.html
With that in place we would recommend calling .ClearArray(); on the SerializedProperty when you are expecting it to be clear.
Resolution Note (6000.5.X):
Thank you for reporting a bug to Unity.
After reviewing the behavior, we've confirmed it aligns with the current design and intended use of the feature. We understand this may differ from your expectations or workflow.
We will close this case as 'As Designed.' If you have feedback on how the feature could better meet your needs, please let us know - we value your input and consider it in future improvements.
When a element is inserted into an array "The value of the inserted element is undefined and should be explicitly set after calling this function." from the documentation at https://docs.unity3d.com/ScriptReference/SerializedProperty.InsertArrayElementAtIndex.html
With that in place we would recommend calling .ClearArray(); on the SerializedProperty when you are expecting it to be clear.