Search Issue Tracker
Won't Fix
Votes
0
Found in
5.1.0b5
Issue ID
694777
Regression
No
Object.FindObjectOfType finds all objects of type and returns the first one, which allocates GC
How to reproduce:
1. Open attached project
2. Attach script Test.cs to any gameobject
- The script simply attempts to find an object of its own type in the Update() message
3. Play the scene
4. Open the Profiler
- Note how BehaviourUpdate -> Test.Update() is allocating GC
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
- "NullReferenceException" error is thrown when swapping between built-in and URP depending on assets loaded out of asset bundles
- Objects receive a black outline in Ray Traced Screen Space Reflections
- NullReferenceException Occurs When Baking APV with GPU Streaming Enabled
- Scene renders incorrectly when using RenderGraphUtils.AddCopyPass
- [URP] Searchable context menu instantly closes when attempting to open it
Resolution Note:
We really appreciate your contribution to the Unity product. Thank you for reporting this issue. We take every case submitted to us seriously by investigating the impact on you, our customer, as well as the impact it may have on the engineering and experience of our product.
This particular case has been investigated thoroughly and we have decided, in the interests of protecting the stability and features of Unity for users that rely upon the affected versions, to not address this issue.