diff --git a/Editor/Helpers/HeadlessSettings.cs b/Editor/Helpers/HeadlessSettings.cs index f9d58ac..638ebbb 100644 --- a/Editor/Helpers/HeadlessSettings.cs +++ b/Editor/Helpers/HeadlessSettings.cs @@ -20,13 +20,13 @@ public class HeadlessSettings { [Serializable] public class SteamHeadless { [Tooltip("Fill with Defines that should be forced enabled for Headless Builds. Other Defines will be disabled.")] - public string[] enabledDefinesOverwrite; + public string[] enabledDefinesOverwrite = new string[] { "STEAM" }; } [Serializable] public class GogHeadless { [Tooltip("Fill with Defines that should be forced enabled for Headless Builds. Other Defines will be disabled.")] - public string[] enabledDefinesOverwrite; + public string[] enabledDefinesOverwrite = new string[] { "GOGGALAXY", "DISABLESTEAMWORKS" }; } } } \ No newline at end of file diff --git a/Editor/Modules/DefineModule.cs b/Editor/Modules/DefineModule.cs index 43f0fd7..97d1dbe 100644 --- a/Editor/Modules/DefineModule.cs +++ b/Editor/Modules/DefineModule.cs @@ -8,6 +8,8 @@ public class DefineModule : TargetGroupDependentModuleBase { private EditorHelper.UI.ListField definesList = null; private EditorHelper.UI.EditorPrefsManagedFoldoutArea foldoutArea = null; + List defaultDefines = new List() { "STEAM", "DISABLESTEAMWORKS", "GOGGALAXY" }; + public DefineModule(TargetGroupModule targetGroupModule) : base(targetGroupModule) { CreateDefinesList(); foldoutArea = new EditorHelper.UI.EditorPrefsManagedFoldoutArea(OnFoldoutArea, "defineModule.targetFoldout"); @@ -64,5 +66,15 @@ void CreateDefinesList() { } }; } + + List AddDefaultDefines(List defineList) { + foreach (string define in defaultDefines) { + if (!defineList.Contains(define) && !defineList.Contains("*"+define)) { + defineList.Add("*"+define); + } + } + + return defineList; + } } } diff --git a/LICENSE.meta b/LICENSE.meta new file mode 100644 index 0000000..8bc0eb3 --- /dev/null +++ b/LICENSE.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 9c5c39361f0ce3249b262424f9752177 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Runtime/BuildManagerSettings.asset b/Runtime/BuildManagerSettings.asset index f9b8a07..c98b339 100644 --- a/Runtime/BuildManagerSettings.asset +++ b/Runtime/BuildManagerSettings.asset @@ -64,6 +64,9 @@ MonoBehaviour: headless: jenkinsPropertiesPath: ../../jenkins.properties steam: - enabledDefinesOverwrite: [] + enabledDefinesOverwrite: + - STEAM gog: - enabledDefinesOverwrite: [] + enabledDefinesOverwrite: + - GOGGALAXY + - DISABLESTEAMWORKS diff --git a/package.json b/package.json index 8b6d5c4..1d77cdf 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "unityRelease": "16f1", "dependencies": { "com.gentlymadstudios.editorhelper": "0.1.0", + "com.gentlymadstudios.vdfserializer": "0.1.0", "com.unity.addressables": "1.20.5" }, "keywords": [