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
- var VisionOSEDRHeadromm has a comma instead of a dot when building with Metal Rendering App Mode and local OS localization is set to German
- IAP Catalog remove product “x” and add product “+” buttons are not consistent with other remove and add buttons in the Editor
- Performance issues in Play Mode when quickly hovering the mouse cursor over Hierarchy GameObjects
- Frame Debugger displays incorrect output when FidelityFX Super Resolution or Spatial-Temporal Upscaler is used with Temporal Anti-aliasing or Subpixel Morphological Anti-aliasing
- The layout system is failing to correctly calculate or apply the height of the Japanese fallback font when the primary English font's metrics are used
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().