Search Issue Tracker
By Design
By Design in 6000.1.X
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
- Build fails when building a project containing an 18+ dimension array with IL2CPP
- [Android][Sentis] Human poses are not detected when using the BlazePose model
- Sprite Editor Outline Tool Overlay is not displayed when no Sprite is selected
- “No method with RuntimeInitializeOnLoadMethod attribute” warning from ReadmeEditor.cs is thrown after installing Project Auditor Rules
- Projection matrix is altered when using RasterCommandBuffer.ClearRenderTarget on DX12 and Metal
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().
Resolution Note (6000.1.X):
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().