Search Issue Tracker

Active

Under Consideration for 2021.3.X, 2022.3.X

Won't Fix in 2023.2.X

Votes

0

Found in

2021.3.29f1

2022.3.6f1

2023.1.6f1

2023.2.0b2

2023.3.0a3

6000.0.0b11

Issue ID

UUM-44502

Regression

No

Unity Editor references the last ExposedReference element in a List instead of creating a new instance when a new element is added

--

-

Reproduction steps:
1. Open the attached “IN-46047_TryingRetractingChangesAgain Repro.zip“ project
2. Open the “SampleScene” from the Scenes folder
3. Select the “GameObject” in the Hierarchy
4. Open the Timeline window
5. Select the “Attempt 2 Track” track
6. In the Inspector window, make sure there is at least one element with a GameObject reference already set in the “Ex Ref Class List”
7. Add a new element to the “Ex Ref Class List” by pressing the plus button at the bottom of it
8. Observe how the previous last reference to a GameObject got copied over to the last element
9. Change the GameObject reference of the last or previous last element in the List to another GameObject
10. Observe how both references in the last and the previous last elements get changed to the same GameObject at the same time while changing one or the other

Expected result: All newly added elements to the “Ex Ref Class List” reference no GameObject by default and get changed individually when changing any one of those elements
Actual result: All newly added elements to the “Ex Ref Class List” reference the same GameObject as the previously last element of the List and get changed together when changing any one of those elements

Reproducible with: 2021.3.29f1, 2022.3.6f1, 2023.1.6f1, 2023.2.0b2

Reproduced on: Windows 11 Pro

Notes:
- If the last ExposedReference element in the List is not a GameObject, then a new instance does get created but the element value does get copied over (elements can still be changed individually)

  1. Resolution Note (2023.2.X):

    Closing as Won't fix due to 2023.2 reaching it's EOL.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.