Skip to content

Commit

Permalink
Add VDF Serializer to Dependencies
Browse files Browse the repository at this point in the history
Make Defines Generalistic
  • Loading branch information
Markus committed Nov 30, 2022
1 parent deabcdf commit 5d40f0d
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Editor/Helpers/HeadlessSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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" };
}
}
}
12 changes: 12 additions & 0 deletions Editor/Modules/DefineModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ public class DefineModule : TargetGroupDependentModuleBase {
private EditorHelper.UI.ListField<string> definesList = null;
private EditorHelper.UI.EditorPrefsManagedFoldoutArea foldoutArea = null;

List<string> defaultDefines = new List<string>() { "STEAM", "DISABLESTEAMWORKS", "GOGGALAXY" };

public DefineModule(TargetGroupModule targetGroupModule) : base(targetGroupModule) {
CreateDefinesList();
foldoutArea = new EditorHelper.UI.EditorPrefsManagedFoldoutArea(OnFoldoutArea, "defineModule.targetFoldout");
Expand Down Expand Up @@ -64,5 +66,15 @@ void CreateDefinesList() {
}
};
}

List<string> AddDefaultDefines(List<string> defineList) {
foreach (string define in defaultDefines) {
if (!defineList.Contains(define) && !defineList.Contains("*"+define)) {
defineList.Add("*"+define);
}
}

return defineList;
}
}
}
7 changes: 7 additions & 0 deletions LICENSE.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions Runtime/BuildManagerSettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ MonoBehaviour:
headless:
jenkinsPropertiesPath: ../../jenkins.properties
steam:
enabledDefinesOverwrite: []
enabledDefinesOverwrite:
- STEAM
gog:
enabledDefinesOverwrite: []
enabledDefinesOverwrite:
- GOGGALAXY
- DISABLESTEAMWORKS
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down

0 comments on commit 5d40f0d

Please sign in to comment.