static void PrepareVariables() { headlessSettings = HeadlessEditor.LoadSettings(HeadlessProfiles.currentProfile, true); assetsFolder = NormalizePath(Application.dataPath); projectFolder = NormalizePath(Directory.GetParent(assetsFolder).ToString()); dummyFolder = NormalizePath(HeadlessExtensions.GetHeadlessBuilderPath(true) + "/Editor/Assets/Dummy"); Directory.CreateDirectory(projectFolder + "/headless_builder_backup"); backupFolder = NormalizePath(projectFolder + "/headless_builder_backup"); }
public static void FindProfiles() { Dictionary <string, string> newList = new Dictionary <string, string>(); string[] profiles = AssetDatabase.FindAssets("HeadlessSettings"); foreach (var guid in profiles) { string profilePath = AssetDatabase.GUIDToAssetPath(guid); if (profilePath.EndsWith(".asset")) { HeadlessSettings profileData = HeadlessEditor.LoadSettings(profilePath, false); newList.Add(profilePath, profileData.profileName); } } profileList = newList; }