ARFoundation 템플릿 이미지 및 깊이 이미지 표시
3784 단어 ARFoundation
UI - Rawimage 만들기

다른 Rawimage를 만들어 Image Stncil, Image Depth로 이름 변경

Canvas를 선택하고 UIScalleMode를 SccalleWithScreenSize로 변경합니다.

개별 Rawimage 크기 변경


DrawHumanStencil.cs를 제작하여 다음과 같은 내용을 기술하다
DrawHumanStencil
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.XR.ARFoundation;
public class DrawHumanStencil : MonoBehaviour
{
[SerializeField]
private RawImage imageStencil;
[SerializeField]
private RawImage imageDepth;
private AROcclusionManager m_AROcclusionManager;
void Awake()
{
m_AROcclusionManager = GetComponent<AROcclusionManager>();
}
void Update()
{
// AROcclusionManager から取得したステンシル画像をテクスチャとして描画する
imageStencil.texture = m_AROcclusionManager.humanStencilTexture;
// AROcclusionManager から取得したデプス画像をテクスチャとして描画する
imageDepth.texture = m_AROcclusionManager.humanDepthTexture;
}
}
ARCamera에 스크립트를 추가하고 Rawimage 포함
Reference
이 문제에 관하여(ARFoundation 템플릿 이미지 및 깊이 이미지 표시), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/bu-ta/items/702c3af3cd38cc6aa270텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)