오클루전 포털은 열려 있거나 닫혀 있을 수 있습니다. 오클루전 포털이 닫혀 있으면 다른 게임 오브젝트를 가립니다. 오클루전 포털이 열려 있으면 다른 게임 오브젝트를 가리지 않습니다.
씬에 열리거나 닫힌 상태의 게임 오브젝트(예: 문)가 있는 경우 오클루전 컬링 시스템에서 이를 표현하기 위한 오클루전 포털을 생성할 수 있습니다. 그러고 나면 해당 게임 오브젝트의 상태에 따라 오클루전 포털의 열림 상태를 설정할 수 있습니다. Occlusion Portal 컴포넌트는 표현하는 게임 오브젝트에 배치되지 않아도 괜찮습니다.
스크립트를 사용하여 오클루전 포털의 Open 프로퍼티를 원하는 상태로 설정하십시오.
void OpenDoor() {
// Toggle the Occlusion Portal's open state, so that Unity renders the GameObjects behind it
myOcclusionPortal.open = true;
// Call a function that plays a door opening animation, or otherwise hides the GameObject
…
}
프로퍼티: | 기능: |
---|---|
Open | 활성화하면 오클루전 포털이 열리고 렌더러를 가리지 않습니다. 비활성화하면 오클루전 포털이 닫히고 렌더러를 가립니다. |
Center | 오클루전 포털의 중심을 설정합니다. 기본값은 0,0,0입니다. |
Size | 오클루전 포털의 크기를 정의합니다. |
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.