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
- Assets are created in the Package folders when creating assets via custom buttons in the Inspector window or other windows
- “Select” windows are named differently on Windows and macOS
- [Windows] No minimum “Select” window size
- Enabling “Editor Extension Authoring” in UI Builder doesn’t dirty the document and saving with shortcut doesn’t persist the state
- WebRequest.Create() function fails with "URI prefix is not recognized" errors when the project is built for Linux Standalone or Windows Dedicated Server
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().