Anyone use depth occlusion and simply want to turn it off at runtime? Simply disabling AROcclusionManager doesn’t work as expected. I believe the trick is to set EnvironmentDepthMode to Disabled but having problems doing this from an external class.
Lets say my reference to AROcclusionManager is arOcclusionMgr.
How would I set EnvironmentDepthMode to EnvironmentDepthMode.Disabled given the following?
public EnvironmentDepthMode requestedEnvironmentDepthMode
{
get => subsystem?.requestedEnvironmentDepthMode ?? m_EnvironmentDepthMode;
set
{
m_EnvironmentDepthMode = value;
if (enabled && descriptor?.supportsEnvironmentDepthImage == true)
{
subsystem.requestedEnvironmentDepthMode = value;
}
}
}
/// <summary>
/// Get the current environment depth mode in use by the subsystem.
/// </summary>
public EnvironmentDepthMode currentEnvironmentDepthMode => subsystem?.currentEnvironmentDepthMode ?? EnvironmentDepthMode.Disabled;
`