Search Issue Tracker
Fixed in 2018.2.X
Fixed in 2017.1.X, 2017.2.X, 2017.3.X, 2018.1.X
Unity generates garbage when UnityEvents are invoked with value type parameters if the event has a static event handler
1. Open the included project "UnityEventsBoxing2_UnityProject".
2. Open the Unity profiler and instruct it to record.
3. Open and play the scene "TestScene-NoGCAlloc". The UI text explains how the test is set up. Observe the profiler memory view and notice that no garbage is generated when the event fires in this case because it only has a dynamic event handler. This is good!
4. Open and play the scene "TestScene-GCAlloc". The UI text explains how the test is set up. Observe the profiler memory view and notice that 20 bytes of garbage are generated each time the event fires because it has a static event handler. This is bad...
Reproduced in 2017.1.2p2, 2018.1.0a3
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- [URP] Gizmos position and scale incorrectly when changing camera rect
- Folder name is truncated when dot is used in the name
- Reorderable List elements cannot be edited when using Custom Editors and Serialized Objects
- VideoPlayer does not play video when device is using Android 6.0.1
- Mesh.GetIndexBuffer() requires Mesh's 'Read/Write' flag to be enabled to get its index buffer data in Builds