// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved. using System; using FlaxEngine; namespace FlaxEditor.Content.Settings { partial class BuildSettings { #if FLAX_EDITOR /// /// The build presets. /// [EditorOrder(5000), EditorDisplay("Presets", EditorDisplayAttribute.InlineStyle), Tooltip("Build presets configuration")] public BuildPreset[] Presets = { new BuildPreset { Name = "Development", Targets = new[] { new BuildTarget { Name = "Windows 64bit", Output = "Output\\Win64", Platform = BuildPlatform.Windows64, Mode = BuildConfiguration.Development, }, } }, new BuildPreset { Name = "Release", Targets = new[] { new BuildTarget { Name = "Windows 64bit", Output = "Output\\Win64", Platform = BuildPlatform.Windows64, Mode = BuildConfiguration.Release, }, } }, }; /// /// Gets the preset of the given name (ignore case search) or returns null if cannot find it. /// /// The preset name. /// Found preset or null if is missing. public BuildPreset GetPreset(string name) { if (Presets != null) { for (int i = 0; i < Presets.Length; i++) { if (string.Equals(Presets[i].Name, name, StringComparison.OrdinalIgnoreCase)) return Presets[i]; } } return null; } #endif } }