Search Issue Tracker

Active

Under Consideration for 6000.5.X

Votes

0

Found in

6000.0.65f1

6000.3.4f1

6000.4.0b4

6000.5.0a4

Issue ID

UUM-132087

Regression

Yes

PropertyDrawer gets disposed while still being active when adding a secondary component

UI Toolkit Framework

-

How to reproduce:
1. Extract and open the attached “IN-128692.zip“ project
2. Open the Assets/Scenes/SampleScene.unity scene
3. Select the ‘Test Object’ GameObject in the Hierarchy
4. In the Inspector tab, click on ‘Add Component’
5. Add the ‘Other Test Object’ Script
6. Observe the console

Actual result: The ‘TestAttributeDrawer’ gets disposed right after being created, and the ‘Test Object (Script)’ PropertyDrawer shows “DISPOSED!“
Expected result: The ‘TestAttributeDrawer’ does not get disposed, and the ‘Test Object (Script)’ PropertyDrawer shows “This is a custom drawer for TestAttribute“

Reproducible with: 2023.3.0a10, 6000.0.65f1, 6000.3.4f1, 6000.4.0b4, 6000.5.0a4
Not reproducible with: 2023.3.0a9

Reproducible on: Ubuntu 22.04, macOS 26.2 (M1 Silicon)
Could not reproduce on: No other environment tested

Note: If you follow the steps and then remove the ‘Other Test Object (Script)' component, the Editor disposes of the property drawer and then creates a new one. Then, when the ‘Test Object’ GameObject is unselected, the Editor does not call the dispose method on the newly created property drawer.

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.