Version: 2022.2
言語: 日本語
Navigation Areas and Costs
NavMesh Agent を他のコンポーネントと共に使う

加算読み込みを使用して複数の NavMesh を読み込む

The NavMeshes in different Scenes are not connected by default. When you load another level using Application.LoadLevelAdditive() you will need to use OffMesh links to connect the NavMeshes in different scenes.

In this example we have Scene 1 and Scene 2. The Scene 1 has an OffMesh Link starting over a walkable area and landing over a walkable area in Scene 2. There can be as many OffMesh Links connecting the Scenes as necessary.

When authored the other end point of the scene connecting OffMesh links are not connected. After a new Scene is loaded, the OffMesh Links will be reconnected.

If the multiple scenes have NavMesh overlapping at the same area, the position picking may be arbitrary NavMesh at that location. This applies to agents, OffMesh Links and position picking using the NavMesh API. You should create the scene crossing OffMesh links so that they start and end clearly on over one NavMesh only. Overlapping NavMesh areas are not automatically connected.

参考文献

Navigation Areas and Costs
NavMesh Agent を他のコンポーネントと共に使う