Search Issue Tracker
Won't Fix
Votes
0
Found in
2021.3.39f1
2022.3.31f1
6000.0.5f1
Issue ID
UUM-73225
Regression
No
AssetReference property drawer has incorrect layout and becomes uneditable when placed inside IMGUIContainer
Reproduction steps:
1. Open the attached “BugReportIMGUI.zip” project
2. Open the “BugReport_04” scene (Assets > Scenes)
3. Click on the “Test01” GameObject in the Hierarchy
4. Observe the Inspector
Expected result: Elements are not overlapping
Actual result: Elements are overlapping
Reproducible with: 2021.3.39f1, 2022.3.31f1, 6000.0.5f1
Reproducible on: Windows 11
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
- Crash on UnityPlayer!profiling::ProfilerManager::DisposeProfilerRecorder+0xa when Player gets relaunched and exited after running for a long amount of time
- [Input system] When releasing one touch and pressing a second touch during a single frame, the second touch is not translated into UI event line OnPointerDown by the InputSystemUIInputModule
- URP Samples - multiple "Attempting to resolve render surface" and other errors appear when setting Quality pipeline asset
- OnDemandRendering.willCurrentFrameRender returns incorrect values in the Player when UnityEngine.Rendering.OnDemandRendering.renderFrameInterval is greater than 1
- Root motion is not reapplied when transitioning from an animation without root motion to an animation with root motion
Resolution Note:
To display an AssetReference field with the SerializedProperty at hand, the code inside the IMGUIContainer can simply be
`EditorGUILayout.PropertyField(property);`
It takes care of the layout and will display the field as expected.
Bear in mind that IMGUI code is immediate mode so it is run every frame, hence using reflection and CreateInstance in an IMGUIContainer is very costly and should be avoided.