Search code examples
unity-game-enginegoogle-project-tango

Tango / Unity: is TangoApplication.m_enableDepth immutable at runtime?


I am messing with ways to turn TangoPointCloud on and off at runtime, and I suppose that I can turn the whole script off, but I was hoping that I could set:

SetDepthCameraRate(TangoEnums.TangoDepthCameraRate.DISABLED);

or:

m_enableDepth = false;

But neither of these methods seems to work at runtime, is this a similar issue to the fact that:

tangoApplication.m_3drResolutionMeters 

cannot be changed at runtime currently?


Solution

  • So I revisited this issue today and the compiled .apk that was not working is now working correctly. The only thing that has changed is a few reboots, so there must be an issue that causes the Tango SDK to misbehave in between app launches that a reboot can solve. Frustrating, but it appears that both of these methods work correctly to stop the point cloud generation:

    SetDepthCameraRate(TangoEnums.TangoDepthCameraRate.DISABLED);
    m_enableDepth = false;