Search Issue Tracker

Won't Fix

Votes

0

Found in

2021.3.38f1

2022.3.29f1

6000.0.2f1

Issue ID

UUM-72221

Regression

No

Default value in the Script is not assigned when applying the UI Toolkit ObjectField

--

-

How to reproduce:
1. Open the user-attached project “BugReport”
2. In any scene right-click in the Hierarchy → Create Empty
3. In the Inspector click Add Component → Node
4. Observe the “ContainerType” field on the Component

Expected results: The field is set to an object
Actual results: The field is set to “None”

Reproducible with: 2021.3.38f1, 2022.3.29f1, 6000.0.2f1

Reproducible on: Windows 11 Pro
Not reproducible on: No other environment tested

Notes:
-In 2022.3 stream instead of the field set to “None” it throws a NullReferenceException and the field is not shown at all
-In 2021.3 stream it doesn’t show that the Component was added at all but it throws NullReferenceException errors every time you select the GameObject in the Hierarchy

  1. Resolution Note:

    This has been fixed on 6000.f4 when using the new UxmlSerializedData system.
    Versions that use UxmlTraits such as those on 2022.3 and lower do not support setting the value of ObjectFields via UXML.

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.