레벨 지오메트리에서 내비메시 생성 프로세스를 내비메시 베이킹이라 부릅니다.이 프로세스는 내비게이션 정적으로 마크된 렌더 메시와 모든 게임 오브젝트의 터레인을 수집한 후 처리하여 레벨의 걸을 수 있는 표면과 비슷한 내비게이션 메시를 생성합니다.
Unity에서 내비메시 생성은 Navigation 창에서 처리합니다(메뉴:__Window__ > AI > Navigation (Obsolete)).
씬에서는 네 가지 단순한 단계를 거쳐 내비메시를 빌드합니다.
빌드된 내비메시 결과는 내비게이션 창이 열리고 사용자의 눈에 씬이 들어올 때마다 기본 지오메트리 레벨 위에 파란 오버레이로 나타납니다.
위 그림에서 볼 수 있듯이, 생성된 내비메시에서 걸을 수 있는 영역이 더 작아 보입니다. 내비메시는 에이전트의 센터가 움직일 수 있는 영역을 나타냅니다. 개념적으로는 에이전트를 작아진 내비메시의 포인트로 여기든 풀 사이즈 내비메시의 원으로 여기든 둘은 같은 요소이므로 상관이 없습니다. 하지만 포인트로 해석하면 런타임 효율을 개선할 수 있고, 에이전트가 반지름에 상관없이 틈 사이로 지나갈 수 있는지 여부를 설계자가 즉시 확인할 수도 있습니다.
또 한 가지 유의해야 할 점은 내비메시는 걸을 수 있는 표면에 대한 근사치라는 점입니다.예를 들어 계단의 경우 평면으로 표현되지만 소스 표면은 계단으로 되어 있을 수 있습니다.이는 내비메시 데이터 크기를 작게 유지하기 위해서입니다.근사치의 부작용은 가끔씩 레벨 지오메트리에 추가 영역이 있어야 에이전트가 좁은 지점을 통과할 수 있다는 것입니다.
베이킹이 끝나면 내비메시 에셋 파일이 씬 이름과 같은 이름을 가지고 폴더 안에 생성됩니다. 예를 들어 씬을 Assets 폴더 안에 첫 번째 레벨 로 만들었다면 내비메시는 Assets > First Level > NavMesh.asset 에 위치하게 됩니다.
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.