EditorGUILayout.HelpBox("Be careful with large resolutions. It is often better with a relatively low resolution since it generates cleaner navmeshes with fewer nodes.",MessageType.Warning);
}
break;
caseNavmeshCut.MeshType.Sphere:
FloatField("circleRadius","Radius",min:0.01f);
PropertyField("circleResolution","Resolution");
if(circleResolution.intValue>=20){
EditorGUILayout.HelpBox("Be careful with large resolutions. It is often better with a relatively low resolution since it generates cleaner navmeshes with fewer nodes.",MessageType.Warning);
}
break;
caseNavmeshCut.MeshType.Rectangle:
PropertyField("rectangleSize");
FloatField("height",min:0f);
break;
caseNavmeshCut.MeshType.Box:
PropertyField("rectangleSize.x","Width");
PropertyField("height","Height");
PropertyField("rectangleSize.y","Depth");
break;
caseNavmeshCut.MeshType.CustomMesh:
PropertyField("mesh");
PropertyField("meshScale");
FloatField("height",min:0f);
EditorGUILayout.HelpBox("This mesh should be a planar surface. Take a look at the documentation for an example.",MessageType.Info);
EditorGUILayout.HelpBox("The NavmeshCut component requires Unity 2022.3 or newer to work, due to Unity bugs in earlier versions. Please update Unity to 2022.3.21 or later, if you want to use navmesh cutting.",MessageType.Error);
#elif!MODULE_COLLECTIONS_2_2_0_OR_NEWER
EditorGUILayout.HelpBox("The NavmeshCut component requires the com.unity.collections package version 2.2.0 or newer. Please install it using the Package Manager.",MessageType.Error);