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
- [Android] Virtual device crashes with "Scudo ERROR: invalid chunk state when deallocating address" error in Firebase Test Lab when Optimized Frame Pacing is enabled
- Particle System does not resume when its Culling Mode is set to "Pause" or "Pause and Catch-up," and particle position simulate in world space
- "Custom Render Queue" field cannot be set above "2000" when changing it in the Inspector window using Debug mode
- "Preloaded Assets" list is empty when Player is built
- Input.GetKey() does not register key release when a specific key is pressed, and then released after opening a context menu
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.