/// <summary> /// Starts drawing the spawn point interface. /// </summary> private void InterfaceSpawnPoints() { EditorGUILayout.BeginVertical(styleInterface); useRaycastObjectPosition = EditorStatics.CreateBoolField( "Raycast Position", "If true, raycasting a point will create a new spawnpoint/path/pathpoint at the center of the object. Else, it'll create it at the exact ray hit location", ref useRaycastObjectPosition ); pathLineOffset = EditorStatics.CreateVector3AxisFields( "Gizmo Line ", pathLineOffset, EditorStatics.Width_300 ); EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField("Spawn Points", EditorStatics.Width_150); if (GUILayout.Button(EditorStatics.StringAddSign, EditorStatics.Width_30)) { so.Collection.AddSpawnPoint(); } // Remove a spawn point if (GUILayout.Button(EditorStatics.StringRemoveSign, EditorStatics.Width_30)) { so.Collection.Remove(); } EditorGUILayout.EndHorizontal(); EditorGUILayout.EndVertical(); // Foldout toggle if (GetCount() > 0) { SpawnPointsDraw(); } }