googlearchive / poly-toolkit-unity

Poly Toolkit for Unity
Apache License 2.0
101 stars 29 forks source link

Poly toolkit changes behaviour of ARCore #14

Closed oreyg closed 6 years ago

oreyg commented 6 years ago

Without PolyToolkitManager on the scene ARCore succesfully restores its state after loosing and regaining camera feed. I use the default class that comes with ARCore examples to generate and display planes (Only difference is in the shader).

To reproduce:

  1. Download official ARCore-Unity-Sdk https://github.com/google-ar/arcore-unity-sdk
  2. Import Poly toolkit.
  3. Open CloudAnchor scene.
  4. Add PolyToolkitManager to the scene.
oreyg commented 6 years ago

This is because WebRequestManager allocates too much memory. Tested on Galaxy S7 4GB RAM. Setting MAX_CONCURRENT_DOWNLOADS to 2 fixes the issue. You probably should expose this value in the config.

upd. I just noticed, that those ~1GB buffers are not used anywhere...

btco commented 6 years ago

We're working on that. In fact, the memory allocation bug was already fixed at the tip of tree, but isn't yet part of a release. So if you just copy over the version of WebRequestManager.cs from the latest commit in this repo, it should work.

btco commented 6 years ago

Closing as duplicate of #4 This fix will be part of the next release. For now, please patch your copy from the tip of tree.