This repository has been archived by the owner on Nov 8, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
GvrControllerInput.Update() allocates 30 bytes on the heap every frame #835
Comments
Thanks for your report; we'll take a look. |
I've traced the allocation to the UnityEngine.XR.XRSettings.loadedDeviceName (UnityEngine.VR.VRSettings.loadedDeviceName pre-2017.2) method, which allocates the memory for a new string. Unfortunately, I don't see a clean workaround from our end. We've marked this as a Unity bug. |
We've partially fixed this in the latest release. |
This has been fixed in our upcoming GVR release. The fix will be compatible with 2018.3 Unity and later (and will have no effect on earlier versions). |
Any chance you could push this fix into the Unity Long Term Support stream? Thanks. |
This required an API change, and as such, is not likely to get a back port to 2017.4. |
Now released. |
# for free
to subscribe to this conversation on GitHub.
Already have an account?
#.
GvrControllerInput.Update() allocates 30 bytes on the heap every frame of gameplay. This eventually leads to the GC needing to run. Generally speaking, nothing should allocate on the heap every frame of gameplay.
Found using:
Gvr sdk 1.120.0
Unity 2017.3.p2
Google Pixel XL
To repro:
Build any game that uses GvrController prefab with default arm model, etc., connect to Unity profiler, and observe heap allocations.
At first glance, it's not obvious what is allocating in here and I haven't been able to deep profile it yet to find out.
The text was updated successfully, but these errors were encountered: