Search Issue Tracker

Fixed in 5.4.2



Found in


Issue ID




[GoogleVR] Canvas are allocating memory and do not release it when using VR cameras



Reproduction steps:
1) Create new project and import "GoogleVRForUnity" package
2) Open "DemoScene" scene (GoogleVR/DemoScenes/HeadsetDemo/DemoScene.unity)
3) Open profiler
4) Enter Playmode
-- Notice how memory is rising infinitely (not releasing)

- Toggling between two cameras and one (turning on and off VR mode) releases memory
- Deleting all canvas in scene also releases memory
- Issue reproduces on iOS and Android

Regression introduced in 5.3.4p5

Comments (11)

  1. A9e111d1a0fa24ccaf1bcedd1c80e857?d=mm


    May 09, 2017 15:47

    Reproduced in 5.6.0f3

    Please fix, thanks!

  2. B76cb803d90fd15eec3249a488c8174c?d=mm


    Dec 20, 2016 03:33

    Reproduced in 5.4.1f1, 5.50f3

    plz fix thanks

  3. 022c156d76ef8c3212a324c252fa9fbe?d=mm


    Sep 15, 2016 20:24

    Fix now out in Patch 5.3.6p5 and Patch 5.4.1p1

  4. 82d7ad421f328c7ee1dba0e25e63e744?d=mm


    Sep 13, 2016 09:56

    It's not fixed yet in 5.4.1, but 5.4.2 is not released. Very strange things.

  5. 0463cfb596d99d5029f9f4287e7f0842?d=mm


    Aug 30, 2016 13:20

    @mswf on the GoogleVR topic found a great workaround to completely stop the leak, from a post on the Unity forums:

    "This issue is fixed and will be released in patches for both 5.4 and 5.3, however if you are using the cardboard plugin you can work around the memory leak for now.

    In stereoController.cs OnPreCull comment out cam.enabled = false. The issue is that if the camera is not active at the end of the frame its resources wont be freed. This problem will be resolved in Unity going forward."

  6. 24c584983889bee9c6188bfea4010cb0?d=mm


    Aug 29, 2016 15:57

    We are also very eagerly awaiting this fix. Is there any way to make Unity reconsider the fix's release date? This issue affects most if not all Google Cardboard developers. Waiting for 5.4.3 is not an option for Google VR developers.

  7. 865a711e95c6d7f0bbad0e8dfd0d7f3d?d=mm


    Aug 26, 2016 13:28

    We were hoping that was a typo for 5.4.0p3... but it's not in the latest patch. Not sure why this isn't higher priority... This issue has been causing us leaks at about 2mb/s - so causing the app to crash within a minute and blocking us from submission.

  8. 022c156d76ef8c3212a324c252fa9fbe?d=mm


    Aug 25, 2016 20:06

    Just saw this got updated to Fixed... but, in 5.4.3? Is that a typo?

    5.4.1 isn't even out yet, so that makes availability of the fix 3+ months out?

  9. 022c156d76ef8c3212a324c252fa9fbe?d=mm


    Aug 22, 2016 17:58

    To be clear: this is a Unity bug, specifically when "Unity renders a world-space Canvas with any Camera targeting a RenderTexture" -- to quote @smdol, a dev on the GoogleVR Unity SDK:

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.