Search Issue Tracker
Fixed in 2017.3.0f3
Fixed in 2017.1.X, 2017.2.X
Unnecessary garbage is generated while invoking UnityEvents due to boxing
The user recently discovered that if you invoke a UnityEvent with a value type parameter, Unity boxes the argument in an object array, which generates unnecessary garbage. They would like that Unity to not generate garbage when invoking UnityEvents with value type parameters.
They send an example project in which a sphere oscillate colors between white and red and that is controlled by a UnityEvent with a float parameter that fires each Update.
They observed (using the profiler) that 20 bytes of memory is allocated each time the UnityEvent is invoked. And they suspect that it could be due to Unity boxing the float parameter.
Steps to reproduce:
1. Open the scene "DemoScene".
2. Open the Unity Profiler and start recording. Enable Deep Profile.
3. Play the scene. You will see the color of a sphere oscillate between white and red. This is controlled by a UnityEvent with a float parameter that fires each Update.
4. Inspect a frame of the profiler.
Result: Observe that 20 bytes of memory is allocated each time the UnityEvent is invoked. This is due to Unity boxing the float parameter. (See the included screenshot, "ProfilerData.png".)
Reproduced with: 2017.2.0b3, 2017.1.0f3, 5.6.2p3.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- TouchScreenKeyboard.hideInput set from "true" to "false" when TextField is clicked in Android builds
- [Android] ReadPixels gives different results when using Vulkan on some devices
- [URP] Exceeding the platform's supported light limit gives shadow distortion when using Deferred Rendering Path
- URP Sample Buffer Image Tile is moved when the Offset Value is changed
- Static constructor in a struct returns false when running tests with IL2CPP
Nov 06, 2020 07:04
Oct 10, 2019 05:29
Issue tracker is the forum which is provide the information of the tracker which is used different things and https://customessaysreviews.com/sleekwriters-info-review/ specially in the vehicals as well as this tracker which is mostly used in the foreign country in usa and uk.
Mar 12, 2018 22:33