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
- The Game view and Scene view fail to render when launching the Editor with a maximized Render Graph Viewer window
- "List is empty" is poorly visible in the "Create Node" window
- [Android] GameObject with a custom shader becomes invisible when deployed with the Vulkan Graphics API
- “ReferenceError: Pointer_stringify is not defined” error is thrown when downloading a file
- GameObjects are not rendered when using a fragment shader with RWStructuredBuffer in URP
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.