|
|
|
|
|
|
/// </summary>
|
|
|
|
public AROcclusionManager occlusionManager |
|
|
|
{ |
|
|
|
get { return m_OcclusionManager; } |
|
|
|
set { m_OcclusionManager = value; } |
|
|
|
get => m_OcclusionManager; |
|
|
|
set => m_OcclusionManager = value; |
|
|
|
} |
|
|
|
|
|
|
|
[SerializeField] |
|
|
|
|
|
|
/// </summary>
|
|
|
|
public RawImage rawImage |
|
|
|
{ |
|
|
|
get { return m_RawImage; } |
|
|
|
set { m_RawImage = value; } |
|
|
|
get => m_RawImage; |
|
|
|
set => m_RawImage = value; |
|
|
|
} |
|
|
|
|
|
|
|
[SerializeField] |
|
|
|
|
|
|
/// </summary>
|
|
|
|
public Text imageInfo |
|
|
|
{ |
|
|
|
get { return m_ImageInfo; } |
|
|
|
set { m_ImageInfo = value; } |
|
|
|
get => m_ImageInfo; |
|
|
|
set => m_ImageInfo = value; |
|
|
|
} |
|
|
|
|
|
|
|
[SerializeField] |
|
|
|
|
|
|
// If we are on a device that does supports neither human stencil, human depth, nor environment depth,
|
|
|
|
// display a message about unsupported functionality and return.
|
|
|
|
Debug.Assert(m_OcclusionManager != null, "no occlusion manager"); |
|
|
|
if ((m_OcclusionManager.descriptor?.supportsHumanSegmentationStencilImage == false) |
|
|
|
&& (m_OcclusionManager.descriptor?.supportsHumanSegmentationDepthImage == false) |
|
|
|
&& (m_OcclusionManager.descriptor?.supportsEnvironmentDepthImage == false)) |
|
|
|
switch (m_DisplayMode) |
|
|
|
if (m_ImageInfo != null) |
|
|
|
{ |
|
|
|
m_ImageInfo.text = "Depth functionality is not supported on this device."; |
|
|
|
} |
|
|
|
return; |
|
|
|
case DisplayMode.HumanDepth: |
|
|
|
case DisplayMode.HumanStencil: |
|
|
|
if ((m_OcclusionManager.descriptor?.supportsHumanSegmentationDepthImage == false) |
|
|
|
&& (m_OcclusionManager.descriptor?.supportsEnvironmentDepthImage == false)) |
|
|
|
{ |
|
|
|
if (m_ImageInfo != null) |
|
|
|
{ |
|
|
|
m_ImageInfo.text = "Human segmentation is not supported on this device."; |
|
|
|
} |
|
|
|
return; |
|
|
|
} |
|
|
|
break; |
|
|
|
case DisplayMode.EnvironmentDepth : |
|
|
|
default: |
|
|
|
if (m_OcclusionManager.descriptor?.supportsHumanSegmentationStencilImage == false) |
|
|
|
{ |
|
|
|
if (m_ImageInfo != null) |
|
|
|
{ |
|
|
|
m_ImageInfo.text = "Environment depth is not supported on this device."; |
|
|
|
} |
|
|
|
return; |
|
|
|
} |
|
|
|
break; |
|
|
|
} |
|
|
|
|
|
|
|
// Get all of the occlusion textures.
|
|
|
|