浏览代码

Minor refinements.

/4.1
Todd Stinson 4 年前
当前提交
b66080c7
共有 2 个文件被更改,包括 31 次插入15 次删除
  1. 2
      Assets/Scenes/Depth/DepthImages.unity
  2. 44
      Assets/Scripts/TestDepthImage.cs

2
Assets/Scenes/Depth/DepthImages.unity


m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_VerticalOverflow: 1
m_LineSpacing: 1
m_Text: New Text
--- !u!222 &901906346

44
Assets/Scripts/TestDepthImage.cs


/// </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.

正在加载...
取消
保存