| | 1 | | // Copyright (c) 2020-2024 dotBunny Inc. |
| | 2 | | // dotBunny licenses this file to you under the BSL-1.0 license. |
| | 3 | | // See the LICENSE file in the project root for more information. |
| | 4 | |
|
| | 5 | | // ReSharper disable FieldCanBeMadeReadOnly.Global |
| | 6 | | // ReSharper disable ConvertToConstant.Global |
| | 7 | |
|
| | 8 | | namespace GDX |
| | 9 | | { |
| | 10 | | /// <summary> |
| | 11 | | /// Project-wide configuration configurable for runtime override. |
| | 12 | | /// </summary> |
| | 13 | | /// <remarks> |
| | 14 | | /// Field order matters to the Config Generator. |
| | 15 | | /// </remarks> |
| | 16 | | public static class Config |
| | 17 | | { |
| | 18 | | /// <summary> |
| | 19 | | /// A reference number to what version the config was generated based off of. |
| | 20 | | /// </summary> |
| | 21 | | public const int FormatVersion = 2; |
| | 22 | |
|
| | 23 | | const string k_ConfigOutputPath = "Generated/GDX.generated.cs"; |
| | 24 | | const bool k_BuildInfo = false; |
| | 25 | | const bool k_BuildInfoAssemblyDefinition = true; |
| | 26 | | const string k_BuildInfoBuildChangelistArgument = "BUILD_CHANGELIST"; |
| | 27 | | const string k_BuildInfoBuildDescriptionArgument = "BUILD_DESC"; |
| | 28 | | const string k_BuildInfoBuildNumberArgument = "BUILD"; |
| | 29 | | const string k_BuildInfoBuildStreamArgument = "BUILD_STREAM"; |
| | 30 | | const string k_BuildInfoBuildTaskArgument = "BUILD_TASK"; |
| | 31 | | const string k_BuildInfoNamespace = "Generated.Build"; |
| | 32 | | const string k_BuildInfoOutputPath = "Generated/Build/BuildInfo.cs"; |
| | 33 | | const string k_CommandLineParserArgumentPrefix = "--"; |
| | 34 | | const string k_CommandLineParserArgumentSplit = "="; |
| | 35 | | const bool k_EditorTaskDirectorSystem = true; |
| | 36 | | const double k_EditorTaskDirectorSystemTickRate = 0.5d; |
| | 37 | | const bool k_EnvironmentDeveloperConsole = true; |
| | 38 | | const bool k_EnvironmentScriptingDefineSymbol = false; |
| | 39 | | const bool k_EnvironmentToolsMenu = false; |
| | 40 | | const Localization.Language k_LocalizationDefaultCulture = Localization.Language.English; |
| | 41 | | const bool k_LocalizationSetDefaultCulture = true; |
| | 42 | | const string k_PlatformAutomationFolder = "GDX_Automation"; |
| | 43 | | const string k_PlatformCacheFolder = "GDX_Cache"; |
| | 44 | | const bool k_TaskDirectorSystem = false; |
| | 45 | | const float k_TaskDirectorSystemTickRate = 0.1f; |
| | 46 | | const bool k_UpdateProviderCheckForUpdates = true; |
| | 47 | |
|
| | 48 | | /// <summary> |
| | 49 | | /// The asset database relative path of the GDX config override file. |
| | 50 | | /// </summary> |
| 2 | 51 | | [OriginalValue(k_ConfigOutputPath)] public static string ConfigOutputPath = k_ConfigOutputPath; |
| | 52 | |
|
| | 53 | | /// <summary> |
| | 54 | | /// Should the BuildInfo file be written during builds? |
| | 55 | | /// </summary> |
| 2 | 56 | | [OriginalValue(k_BuildInfo)] public static bool BuildInfo = k_BuildInfo; |
| | 57 | |
|
| | 58 | | /// <summary> |
| | 59 | | /// Ensure that there is an assembly definition wrapping the generated content. |
| | 60 | | /// </summary> |
| | 61 | | [OriginalValue(k_BuildInfoAssemblyDefinition)] |
| 2 | 62 | | public static bool BuildInfoAssemblyDefinition = k_BuildInfoAssemblyDefinition; |
| | 63 | |
|
| | 64 | | /// <summary> |
| | 65 | | /// The argument key for the build's changelist to be passed to the BuildInfoGenerator. |
| | 66 | | /// </summary> |
| | 67 | | [OriginalValue(k_BuildInfoBuildChangelistArgument)] |
| 2 | 68 | | public static string BuildInfoBuildChangelistArgument = k_BuildInfoBuildChangelistArgument; |
| | 69 | |
|
| | 70 | | /// <summary> |
| | 71 | | /// The argument key for the build description to be passed to the BuildInfoGenerator. |
| | 72 | | /// </summary> |
| | 73 | | [OriginalValue(k_BuildInfoBuildDescriptionArgument)] |
| 2 | 74 | | public static string BuildInfoBuildDescriptionArgument = k_BuildInfoBuildDescriptionArgument; |
| | 75 | |
|
| | 76 | | /// <summary> |
| | 77 | | /// The argument key for the build number to be passed to the BuildInfoGenerator. |
| | 78 | | /// </summary> |
| | 79 | | [OriginalValue(k_BuildInfoBuildNumberArgument)] |
| 2 | 80 | | public static string BuildInfoBuildNumberArgument = k_BuildInfoBuildNumberArgument; |
| | 81 | |
|
| | 82 | | /// <summary> |
| | 83 | | /// The argument key for the build's stream to be passed to the BuildInfoGenerator. |
| | 84 | | /// </summary> |
| | 85 | | [OriginalValue(k_BuildInfoBuildStreamArgument)] |
| 2 | 86 | | public static string BuildInfoBuildStreamArgument = k_BuildInfoBuildStreamArgument; |
| | 87 | |
|
| | 88 | | /// <summary> |
| | 89 | | /// The argument key for the build's task to be passed to the BuildInfoGenerator. |
| | 90 | | /// </summary> |
| | 91 | | [OriginalValue(k_BuildInfoBuildTaskArgument)] |
| 2 | 92 | | public static string BuildInfoBuildTaskArgument = k_BuildInfoBuildTaskArgument; |
| | 93 | |
|
| | 94 | | /// <summary> |
| | 95 | | /// The namespace where the BuildInfo should be placed. |
| | 96 | | /// </summary> |
| 2 | 97 | | [OriginalValue(k_BuildInfoNamespace)] public static string BuildInfoNamespace = k_BuildInfoNamespace; |
| | 98 | |
|
| | 99 | | /// <summary> |
| | 100 | | /// The path to output the BuildInfo file. |
| | 101 | | /// </summary> |
| 2 | 102 | | [OriginalValue(k_BuildInfoOutputPath)] public static string BuildInfoOutputPath = k_BuildInfoOutputPath; |
| | 103 | |
|
| | 104 | | /// <summary> |
| | 105 | | /// What should be used to denote arguments in the command line? |
| | 106 | | /// </summary> |
| | 107 | | [OriginalValue(k_CommandLineParserArgumentPrefix)] |
| 2 | 108 | | public static string CommandLineParserArgumentPrefix = |
| | 109 | | k_CommandLineParserArgumentPrefix; |
| | 110 | |
|
| | 111 | | /// <summary> |
| | 112 | | /// What should be used to split arguments from their values in the command line? |
| | 113 | | /// </summary> |
| | 114 | | [OriginalValue(k_CommandLineParserArgumentSplit)] |
| 2 | 115 | | public static string CommandLineParserArgumentSplit = k_CommandLineParserArgumentSplit; |
| | 116 | |
|
| | 117 | | /// <summary> |
| | 118 | | /// Should the Editor Task Director tick the Task Director. |
| | 119 | | /// </summary> |
| | 120 | | [OriginalValue(k_EditorTaskDirectorSystem)] |
| 2 | 121 | | public static bool EditorTaskDirectorSystem = k_EditorTaskDirectorSystem; |
| | 122 | |
|
| | 123 | | /// <summary> |
| | 124 | | /// How often should the editor task director tick trigger the task director to tick? |
| | 125 | | /// </summary> |
| | 126 | | [OriginalValue(k_EditorTaskDirectorSystemTickRate)] |
| 2 | 127 | | public static double EditorTaskDirectorSystemTickRate = k_EditorTaskDirectorSystemTickRate; |
| | 128 | |
|
| | 129 | | /// <summary> |
| | 130 | | /// Should the GDX tools menu be added in the editor? |
| | 131 | | /// </summary> |
| | 132 | | [OriginalValue(k_EnvironmentDeveloperConsole)] |
| 2 | 133 | | public static bool EnvironmentDeveloperConsole = k_EnvironmentDeveloperConsole; |
| | 134 | |
|
| | 135 | | /// <summary> |
| | 136 | | /// Should a GDX scripting define symbol be added to all target build groups. |
| | 137 | | /// </summary> |
| | 138 | | [OriginalValue(k_EnvironmentScriptingDefineSymbol)] |
| 2 | 139 | | public static bool EnvironmentScriptingDefineSymbol = k_EnvironmentScriptingDefineSymbol; |
| | 140 | |
|
| | 141 | | /// <summary> |
| | 142 | | /// Should the GDX tools menu be added in the editor? |
| | 143 | | /// </summary> |
| | 144 | | [OriginalValue(k_EnvironmentToolsMenu)] |
| 2 | 145 | | public static bool EnvironmentToolsMenu = k_EnvironmentToolsMenu; |
| | 146 | |
|
| | 147 | | /// <summary> |
| | 148 | | /// The language to set the default thread culture too. |
| | 149 | | /// </summary> |
| | 150 | | [OriginalValue(k_LocalizationDefaultCulture)] |
| 2 | 151 | | public static Localization.Language LocalizationDefaultCulture = k_LocalizationDefaultCulture; |
| | 152 | |
|
| | 153 | | /// <summary> |
| | 154 | | /// Should the default thread culture be set? |
| | 155 | | /// </summary> |
| | 156 | | [OriginalValue(k_LocalizationSetDefaultCulture)] |
| 2 | 157 | | public static bool LocalizationSetDefaultCulture = k_LocalizationSetDefaultCulture; |
| | 158 | |
|
| | 159 | | /// <summary> |
| | 160 | | /// The project relative path where automation should store its artifacts. |
| | 161 | | /// </summary> |
| | 162 | | [OriginalValue(k_PlatformAutomationFolder)] |
| 2 | 163 | | public static string PlatformAutomationFolder = k_PlatformAutomationFolder; |
| | 164 | |
|
| | 165 | | /// <summary> |
| | 166 | | /// The project relative path to use as a cache. |
| | 167 | | /// </summary> |
| 2 | 168 | | [OriginalValue(k_PlatformCacheFolder)] public static string PlatformCacheFolder = k_PlatformCacheFolder; |
| | 169 | |
|
| | 170 | | /// <summary> |
| | 171 | | /// Should the Task Director System be added to the player loop during playmode. |
| | 172 | | /// </summary> |
| 2 | 173 | | [OriginalValue(k_TaskDirectorSystem)] public static bool TaskDirectorSystem = k_TaskDirectorSystem; |
| | 174 | |
|
| | 175 | | /// <summary> |
| | 176 | | /// How often should the task director tick in playmode? |
| | 177 | | /// </summary> |
| | 178 | | [OriginalValue(k_TaskDirectorSystemTickRate)] |
| 2 | 179 | | public static float TaskDirectorSystemTickRate = k_TaskDirectorSystemTickRate; |
| | 180 | |
|
| | 181 | | /// <summary> |
| | 182 | | /// Should GDX check for updates at editor time? |
| | 183 | | /// </summary> |
| | 184 | | [OriginalValue(k_UpdateProviderCheckForUpdates)] |
| 2 | 185 | | public static bool UpdateProviderCheckForUpdates = true; |
| | 186 | | } |
| | 187 | | } |