-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Version 1.2.1 - Allow specify target platforms of MacOS builds
- Loading branch information
0 parents
commit 1dde1d5
Showing
51 changed files
with
1,863 additions
and
0 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
using System; | ||
using GameWorkstore.Automation; | ||
using UnityEditor; | ||
using UnityEngine; | ||
|
||
namespace GameworkStore.Automation.Editor | ||
{ | ||
[CustomEditor(typeof(BuildScript))] | ||
public class BuildScriptEditor : UnityEditor.Editor | ||
{ | ||
public override void OnInspectorGUI() | ||
{ | ||
base.OnInspectorGUI(); | ||
BuildScript buildScript = (BuildScript)target; | ||
if(!buildScript) return; | ||
Show(buildScript); | ||
} | ||
|
||
public void Show(BuildScript buildScript) | ||
{ | ||
ShowButtonCreate<AndroidBuildPlatform>(buildScript, nameof(AndroidBuildPlatform)); | ||
ShowButtonCreate<IOSBuildPlatform>(buildScript, nameof(IOSBuildPlatform)); | ||
ShowButtonCreate<WindowsBuildPlatform>(buildScript, nameof(WindowsBuildPlatform)); | ||
ShowButtonCreate<LinuxBuildPlatform>(buildScript, nameof(LinuxBuildPlatform)); | ||
ShowButtonCreate<MacOSBuildPlatform>(buildScript, nameof(MacOSBuildPlatform)); | ||
ShowButtonCreate<ServerWindowsBuildPlatform>(buildScript, nameof(ServerWindowsBuildPlatform)); | ||
ShowButtonCreate<ServerMacOSBuildPlatform>(buildScript, nameof(ServerMacOSBuildPlatform)); | ||
ShowButtonCreate<ServerLinuxBuildPlatform>(buildScript, nameof(ServerLinuxBuildPlatform)); | ||
ShowButtonCreate<WebGLBuildPlatform>(buildScript, nameof(WebGLBuildPlatform)); | ||
ShowButtonCreate<UWPBuildPlatform>(buildScript, nameof(UWPBuildPlatform)); | ||
|
||
} | ||
|
||
public static void ShowButtonCreate<T>(BuildScript buildScript, string name) where T : BuildPlatform | ||
{ | ||
if(buildScript.Has<T>()) return; | ||
if (GUILayout.Button("New "+ObjectNames.NicifyVariableName(name))) | ||
{ | ||
MakeNewBuildPlatform<T>(buildScript, name); | ||
} | ||
} | ||
|
||
public static void MakeNewBuildPlatform<T>(BuildScript buildScript, string name) where T : BuildPlatform | ||
{ | ||
if(buildScript.Has<T>()) return; | ||
T bp = CreateInstance<T>(); | ||
bp.name = name; | ||
PosCreateBuildInstance(buildScript, bp); | ||
} | ||
|
||
public static void PosCreateBuildInstance(BuildScript buildScript, BuildPlatform bp) | ||
{ | ||
buildScript.BuildPlatforms.Add(bp); | ||
bp.InitializeScriptable(buildScript); | ||
|
||
AssetDatabase.AddObjectToAsset(bp, buildScript); | ||
AssetDatabase.SaveAssets(); | ||
|
||
EditorUtility.SetDirty(buildScript); | ||
EditorUtility.SetDirty(bp); | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"name": "GameWorkstore.Automation.Editor", | ||
"rootNamespace": "", | ||
"references": [ | ||
"GUID:381921da55d39454f9a6ce7095941507", | ||
"GUID:c32d36751e998d74999be5c29b033d6e" | ||
], | ||
"includePlatforms": [ | ||
"Editor" | ||
], | ||
"excludePlatforms": [], | ||
"allowUnsafeCode": false, | ||
"overrideReferences": false, | ||
"precompiledReferences": [], | ||
"autoReferenced": true, | ||
"defineConstraints": [], | ||
"versionDefines": [], | ||
"noEngineReferences": false | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.