Version: 2022.3
LanguageEnglish
  • C#

NavMeshBuildSettings.ValidationReport

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

public string[] ValidationReport(Bounds buildBounds);

Parameters

buildBounds Describes the volume to build NavMesh for.

Returns

string[] The list of violated constraints.

Description

Validates the properties of NavMeshBuildSettings.

Returns a string of violated constraints. - and suggestions for changes for the current values in the build settings and the provided bounds for building the NavMesh.

An empty array is returned if all internal constraints are satisfied.

Some of the settings which you can specify in the NavMeshBuildSettings struct are coupled to each other, meaning there are constraints on the values based on other values. For example, it’s not valid for agentClimb to be larger than agentHeight. Another invalid case is when the vertical size of the buildBounds exceeds the height of 65535 voxel units.

You can use this function to check if the values in NavMeshBuildSettings violate any of the constraints, before starting the NavMesh building process.

Ignoring the violated constraints might give unexpected results when building a NavMesh, but will still produce a NavMesh.

Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961