-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
118 changed files
with
8,790 additions
and
1,150 deletions.
There are no files selected for viewing
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,32 @@ | ||
// This file is auto-generated. Do not modify or move this file. | ||
|
||
public static class BuildConstants | ||
{ | ||
public enum ReleaseType | ||
{ | ||
None, | ||
} | ||
|
||
public enum Platform | ||
{ | ||
None, | ||
} | ||
|
||
public enum Architecture | ||
{ | ||
None, | ||
} | ||
|
||
public enum Distribution | ||
{ | ||
None, | ||
} | ||
|
||
public static readonly System.DateTime buildDate = System.DateTime.Now; | ||
public const string version = ""; | ||
public const ReleaseType releaseType = ReleaseType.None; | ||
public const Platform platform = Platform.None; | ||
public const Architecture architecture = Architecture.None; | ||
public const Distribution distribution = Distribution.None; | ||
} | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
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 |
---|---|---|
@@ -1,49 +1,105 @@ | ||
using System; | ||
using UnityEditor; | ||
using UnityEngine; | ||
using UnityEditor; | ||
|
||
namespace UnityBuild | ||
namespace SuperSystems.UnityBuild | ||
{ | ||
|
||
public abstract class BuildAction : IComparable<BuildAction> | ||
[System.Serializable] | ||
public class BuildAction : ScriptableObject // This really should be an abstract class but needs to be concrete to work with Unity serialization. | ||
{ | ||
public enum ActionType | ||
{ | ||
SingleRun, | ||
PerPlatform | ||
} | ||
|
||
public ActionType actionType = ActionType.PerPlatform; | ||
public string actionName = string.Empty; | ||
public string note = string.Empty; | ||
public BuildFilter filter = new BuildFilter(); | ||
|
||
/// <summary> | ||
/// Build action. | ||
/// This will be exectued once before/after all players are built. | ||
/// </summary> | ||
public virtual void Execute() | ||
{ | ||
} | ||
|
||
/// <summary> | ||
/// Platform-specific build action. | ||
/// This will be executed before/after each individual player is built. | ||
/// </summary> | ||
/// <param name="platform"></param> | ||
public virtual void Execute(BuildPlatform platform) | ||
public virtual void PerBuildExecute( | ||
BuildReleaseType releaseType, | ||
BuildPlatform platform, | ||
BuildArchitecture architecture, | ||
BuildDistribution distribution, | ||
System.DateTime buildTime, ref BuildOptions options, string configKey, string buildPath) | ||
{ | ||
} | ||
|
||
/// <summary> | ||
/// Priority of this build action. Lower values execute earlier. | ||
/// </summary> | ||
public virtual int priority | ||
public void Draw(SerializedObject obj) | ||
{ | ||
get | ||
DrawProperties(obj); | ||
|
||
System.Type myType = this.GetType(); | ||
bool actionTypeSelectable = false; | ||
if (typeof(IPreBuildAction).IsAssignableFrom(myType) && | ||
typeof(IPreBuildPerPlatformAction).IsAssignableFrom(myType)) | ||
{ | ||
return 100; | ||
actionTypeSelectable = true; | ||
} | ||
else if (typeof(IPostBuildAction).IsAssignableFrom(myType) && | ||
typeof(IPostBuildPerPlatformAction).IsAssignableFrom(myType)) | ||
{ | ||
actionTypeSelectable = true; | ||
} | ||
else if (typeof(IPreBuildAction).IsAssignableFrom(myType) || | ||
typeof(IPostBuildAction).IsAssignableFrom(myType)) | ||
{ | ||
actionType = ActionType.SingleRun; | ||
} | ||
else if (typeof(IPreBuildPerPlatformAction).IsAssignableFrom(myType) || | ||
typeof(IPostBuildPerPlatformAction).IsAssignableFrom(myType)) | ||
{ | ||
actionType = ActionType.PerPlatform; | ||
} | ||
} | ||
|
||
#region IComparable | ||
if (actionTypeSelectable) | ||
{ | ||
actionType = (ActionType)EditorGUILayout.EnumPopup("Action Type", actionType); | ||
} | ||
EditorGUILayout.PropertyField(obj.FindProperty("note")); | ||
EditorGUILayout.PropertyField(obj.FindProperty("filter"), GUILayout.Height(0)); | ||
obj.ApplyModifiedProperties(); | ||
} | ||
|
||
public int CompareTo(BuildAction other) | ||
protected virtual void DrawProperties(SerializedObject obj) | ||
{ | ||
if (other == null) | ||
return 1; | ||
else | ||
return priority.CompareTo(other.priority); | ||
} | ||
SerializedProperty prop = obj.GetIterator(); | ||
bool done = false; | ||
|
||
#endregion | ||
while (!done && prop != null) | ||
{ | ||
if (prop.name == "actionName" || | ||
prop.name == "actionType" || | ||
prop.name == "note" || | ||
prop.name == "filter") | ||
{ | ||
// Already drawn these. Go to next, don't enter into object. | ||
done = !prop.NextVisible(false); | ||
} | ||
else if (prop.name == "Base") | ||
{ | ||
// Valid property we want to enter, but don't want to draw the parent node. | ||
done = !prop.NextVisible(true); | ||
} | ||
else | ||
{ | ||
EditorGUILayout.PropertyField(prop); | ||
done = !prop.NextVisible(true); | ||
} | ||
} | ||
} | ||
} | ||
|
||
} | ||
} |
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,11 @@ | ||
| ||
namespace SuperSystems.UnityBuild | ||
{ | ||
|
||
[System.Serializable] | ||
public class BuildActionList | ||
{ | ||
public BuildAction[] buildActions = new BuildAction[] { }; | ||
} | ||
|
||
} |
4 changes: 2 additions & 2 deletions
4
...Bundles/BuildAssetBundlesSettings.cs.meta → Editor/Build/Action/BuildActionList.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.