// Debug.LogFormat("A surface from the prefab got deleted after it has baked a new NavMesh but it hasn't saved it. Now the unsaved asset gets deleted. ({0})", storedPrefabInfo.navMeshData);
// surface got deleted, thus delete its initial NavMeshData asset
EditorGUILayout.LabelField(" ",voxelsPerRadius.ToString("0.00")+" voxels per agent radius",EditorStyles.miniLabel);
}
if(m_OverrideVoxelSize.boolValue)
EditorGUILayout.HelpBox("Voxel size controls how accurately the navigation mesh is generated from the level geometry. A good voxel size is 2-4 voxels per agent radius. Making voxel size smaller will increase build time.",MessageType.None);
EditorGUILayout.HelpBox("Tile size controls the how local the changes to the world are (rebuild or carve). Small tile size allows more local changes, while potentially generating more data overall.",MessageType.None);
}
EditorGUI.indentLevel--;
}
// Height mesh
using(newEditorGUI.DisabledScope(true))
{
EditorGUILayout.PropertyField(m_BuildHeightMesh);
}
EditorGUILayout.Space();
EditorGUI.indentLevel--;
}
EditorGUILayout.Space();
serializedObject.ApplyModifiedProperties();
varhadError=false;
varmultipleTargets=targets.Length>1;
foreach(NavMeshSurfacenavSurfaceintargets)
{
varsettings=navSurface.GetBuildSettings();
// Calculating bounds is potentially expensive when unbounded - so here we just use the center/size.
// It means the validation is not checking vertical voxel limit correctly when the surface is set to something else than "in volume".