Search Issue Tracker

Won't Fix

Votes

1

Found in

2022.3.9f1

2023.1.12f1

2023.2.0b8

2023.3.0a4

Issue ID

UUM-48096

Regression

Yes

Component content is not visible after the addition of the Component

-

Reproduction steps:
1. Open the attached "repro_IN-50399.zip" project
2. Open the "Avenue" Scene
3. Open the "Test" Scene
4. In the Hierarchy, add a new GameObject
5. In the GameObject, add any built-in Component (for example, "Sprite Renderer")

Expected result: Added Component contents are visible
Actual result: Added Component contents are not visible

Reproduced with: 2022.3.9f1, 2023.1.12f1, 2023.2.0b8, 2023.3.0a4
Not reproduced with: 2021.3.30f1

Reproduced on: Windows 10 (22H2)
Not reproduced on: No other environments tested

Notes:
- Couldn’t find the regression point between 2022.1.0a1 and 2022.1.0b1 due to unresolvable compiler errors preventing reproduction
- Reproduces when adding Scripts with serialized fields
- If you select any other GameObject, and then come back to the added GameObject, the contents of the Component will appear. However, in some GameObjects, this method doesn’t work - the Component stays empty
- The issue reproduces even on existing GameObjects
- The issue reproduces in all Scenes
- The issue reproduces when adding more than one Component in succession
- In some GameObjects, you can find empty Components without even adding a new one
- When there are a few Components on a GameObject, the last ones don’t show their content even after exiting and coming back on the GameObject (easiest reproduction is when you create a new GameObject and add 3 Components - the third one will stay empty)

  1. Resolution Note:

    This issue is caused by a direct assignation to EditorApplication.update (in the repro project: MoveCameraWithPlayer.cs, line 78), which is a valid albeit unsafe use of the API. Code that set this callback to a custom value should be aware that it effectively removes everything else that was previously added to it, and can lead to undefined behavior.

    While we're not planning to restrict the use of this API in current versions of the Editor, we are also not going to prevent any undesired effects from unsafe use of it.

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.