Search Issue Tracker
By Design
Votes
0
Found in
2021.3.46f1
2022.3.52f1
6000.0.27f1
6000.1.0a4
Issue ID
UUM-87791
Regression
No
Editor freezes when selecting a GameObject in Play Mode with a script containing a public byte array
Reproduction steps:
1. Open the attached “BugRepro” project
2. Open the “Assets/Scenes/SampleScene.unity“ Scene
3. Enter the Play Mode
4. Select the “Avatar“ GameObject in the Hierarchy window
5. Observe the Editor window
Expected result: The Editor does not freeze
Actual result: Editor freezes
Reproducible with: 2021.3.46f1, 2022.3.52f1, 6000.0.27f1, 6000.1.0a4
Reproducible on: Windows 11
Not reproducible on: No other environment tested
Note: In some versions, Unity freezes for a few seconds when selecting the "Avatar" GameObject, while in others it becomes completely unresponsive
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
- [Linux] VR template "Tutorial Player" GameObject becomes blank after entering Play mode
- Editor window minimizes when changing the Layout while using the Windows split-screen function
- Object pools do not reset when re-entering the Play Mode with reload domain disabled
- Performance issue when using Shadow-Casting Lights with Batch Renderer Groups
- UI Toolkit List view twitches while scrolling down at the end of the list when list view is elastic
Resolution Note:
In this case the user assigns the contents of an image to a public byte array in Start() which will generate hundreds of thousands of UI Elements to display it in the inspector. This is very expensive and can be avoided by making the byte array private or by using [HideInInspector] attribute. In this particular case I would recommend making this private because there is no reason to serialize a value that is always overwritten in Start().