void CreateProfile() { if (!CheckPlaying()) { return; } foreach (var profileName in MadLevelProfile.profileList) { if (newProfileName == profileName) { EditorUtility.DisplayDialog( "Profile Exists!", "Profile called '" + newProfileName + "' already exists!", "Ouch!"); return; } } MadLevelProfile.RegisterProfile(newProfileName); EditorUtility.DisplayDialog( "Profile Created!", "Profile '" + newProfileName + "' created successufully!", "OK"); }