graph.root=ObjectField(newGUIContent("Root","All children of this object will be used as nodes, if it is not set, a tag search will be used instead (see below)"),graph.root,typeof(Transform),true,false)asTransform;
graph.recursive=EditorGUILayout.Toggle(newGUIContent("Recursive","Should children of the children in the root GameObject be searched"),graph.recursive);
graph.searchTag=EditorGUILayout.TagField(newGUIContent("Tag","If root is not set, all objects with this tag will be used as nodes"),graph.searchTag);
if(graph.root!=null){
EditorGUILayout.HelpBox("All children "+(graph.recursive?"and sub-children ":"")+"of 'root' will be used as nodes\nSet root to null to use a tag search instead",MessageType.None);
}else{
EditorGUILayout.HelpBox("All object with the tag '"+graph.searchTag+"' will be used as nodes"+(graph.searchTag=="Untagged"?"\nNote: the tag 'Untagged' cannot be used":""),MessageType.None);
}
graph.maxDistance=EditorGUILayout.FloatField(newGUIContent("Max Distance","The max distance in world space for a connection to be valid. A zero counts as infinity"),graph.maxDistance);
graph.raycast=EditorGUILayout.Toggle(newGUIContent("Raycast","Use raycasting to check if connections are valid between each pair of nodes"),graph.raycast);
if(graph.raycast){
EditorGUI.indentLevel++;
graph.use2DPhysics=EditorGUILayout.Toggle(newGUIContent("Use 2D Physics","If enabled, all raycasts will use the Unity 2D Physics API instead of the 3D one."),graph.use2DPhysics);
graph.thickRaycast=EditorGUILayout.Toggle(newGUIContent("Thick Raycast","A thick raycast checks along a thick line with radius instead of just along a line"),graph.thickRaycast);
if(graph.thickRaycast){
EditorGUI.indentLevel++;
graph.thickRaycastRadius=EditorGUILayout.FloatField(newGUIContent("Raycast Radius","The radius in world units for the thick raycast"),graph.thickRaycastRadius);
graph.optimizeForSparseGraph=EditorGUILayout.Toggle(newGUIContent("Optimize For Sparse Graph","Check online documentation for more information."),graph.optimizeForSparseGraph);