Skip to content

Commit

Permalink
Updated documentation for development and production builds
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholas-maltbie committed Sep 1, 2020
1 parent 5cd1dd9 commit 3f1cd1c
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 0 deletions.
33 changes: 33 additions & 0 deletions Assets/Editor/DevelopmentBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,16 @@

namespace EditorNamespace
{

/// <summary>
/// Development build instructions
/// </summary>
public class DevelopmentBuilder
{
/// <summary>
/// Return Building Options for development client
/// </summary>
/// <returns>Build options for dev client</returns>
private static BuildOptions BuildOptionsClient()
{
EditorUserBuildSettings.development = true;
Expand All @@ -15,6 +23,10 @@ private static BuildOptions BuildOptionsClient()
BuildOptions.AllowDebugging;
}

/// <summary>
/// Return Building Options for development client
/// </summary>
/// <returns>Build options for dev client</returns>
private static BuildOptions BuildOptionsServer()
{
EditorUserBuildSettings.development = true;
Expand All @@ -27,8 +39,14 @@ private static BuildOptions BuildOptionsServer()
BuildOptions.EnableHeadlessMode;
}

/// <summary>
/// Scenes used in development
/// </summary>
private static readonly string[] DevelopmentScenes = {"Assets/Scenes/SampleScene.unity"};

/// <summary>
/// Build a windows 32 bit client
/// </summary>
public static void Client_Windows()
{
BuildPlayerOptions playerOptions = new BuildPlayerOptions();
Expand All @@ -39,6 +57,9 @@ public static void Client_Windows()
BuildPipeline.BuildPlayer(playerOptions);
}

/// <summary>
/// Build a windows 32 bit server
/// </summary>
public static void Server_Windows()
{
BuildPlayerOptions playerOptions = new BuildPlayerOptions();
Expand All @@ -49,6 +70,9 @@ public static void Server_Windows()
BuildPipeline.BuildPlayer(playerOptions);
}

/// <summary>
/// Build a windows 64 bit client
/// </summary>
public static void Client_Windows64()
{
BuildPlayerOptions playerOptions = new BuildPlayerOptions();
Expand All @@ -59,6 +83,9 @@ public static void Client_Windows64()
BuildPipeline.BuildPlayer(playerOptions);
}

/// <summary>
/// Build a windows 64 bit server
/// </summary>
public static void Server_Windows64()
{
BuildPlayerOptions playerOptions = new BuildPlayerOptions();
Expand All @@ -69,6 +96,9 @@ public static void Server_Windows64()
BuildPipeline.BuildPlayer(playerOptions);
}

/// <summary>
/// Build a Linux 64 bit client
/// </summary>
public static void Client_Linux64()
{
BuildPlayerOptions playerOptions = new BuildPlayerOptions();
Expand All @@ -79,6 +109,9 @@ public static void Client_Linux64()
BuildPipeline.BuildPlayer(playerOptions);
}

/// <summary>
/// Build a Linux 64 bit server
/// </summary>
public static void Server_Linux64()
{
BuildPlayerOptions playerOptions = new BuildPlayerOptions();
Expand Down
39 changes: 39 additions & 0 deletions Assets/Editor/ProdBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,38 @@

namespace EditorNamespace
{

/// <summary>
/// Production build instructions
/// </summary>
public class ProdBuilder
{
/// <summary>
/// Return Building Options for production client
/// </summary>
/// <returns>Build options for prod client</returns>
private static BuildOptions BuildOptionsClient()
{
return BuildOptions.None;
}

/// <summary>
/// Return Building Options for production server
/// </summary>
/// <returns>Build options for prod server</returns>
private static BuildOptions BuildOptionsServer()
{
return BuildOptions.EnableHeadlessMode;
}

/// <summary>
/// Scenes used in development
/// </summary>
private static readonly string[] ProdScenes = {"Assets/Scenes/SampleScene.unity"};

/// <summary>
/// Build a Windows 32 bit client
/// </summary>
public static void Client_Windows()
{
BuildPlayerOptions playerOptions = new BuildPlayerOptions();
Expand All @@ -27,6 +45,9 @@ public static void Client_Windows()
BuildPipeline.BuildPlayer(playerOptions);
}

/// <summary>
/// Build a Windows 32 bit server
/// </summary>
public static void Server_Windows()
{
BuildPlayerOptions playerOptions = new BuildPlayerOptions();
Expand All @@ -37,6 +58,9 @@ public static void Server_Windows()
BuildPipeline.BuildPlayer(playerOptions);
}

/// <summary>
/// Build a Windows 64 bit client
/// </summary>
public static void Client_Windows64()
{
BuildPlayerOptions playerOptions = new BuildPlayerOptions();
Expand All @@ -47,6 +71,9 @@ public static void Client_Windows64()
BuildPipeline.BuildPlayer(playerOptions);
}

/// <summary>
/// Build a Windows 64 bit server
/// </summary>
public static void Server_Windows64()
{
BuildPlayerOptions playerOptions = new BuildPlayerOptions();
Expand All @@ -57,6 +84,9 @@ public static void Server_Windows64()
BuildPipeline.BuildPlayer(playerOptions);
}

/// <summary>
/// Build a Linux 64 bit client
/// </summary>
public static void Client_Linux64()
{
BuildPlayerOptions playerOptions = new BuildPlayerOptions();
Expand All @@ -67,6 +97,9 @@ public static void Client_Linux64()
BuildPipeline.BuildPlayer(playerOptions);
}

/// <summary>
/// Build a Linux 64 bit server
/// </summary>
public static void Server_Linux64()
{
BuildPlayerOptions playerOptions = new BuildPlayerOptions();
Expand All @@ -77,6 +110,9 @@ public static void Server_Linux64()
BuildPipeline.BuildPlayer(playerOptions);
}

/// <summary>
/// Build an OSX client
/// </summary>
public static void Client_OSX()
{
BuildOptions options = BuildOptionsClient();
Expand All @@ -88,6 +124,9 @@ public static void Client_OSX()
BuildPipeline.BuildPlayer(playerOptions);
}

/// <summary>
/// Build an OSX server
/// </summary>
public static void Server_OSX()
{
BuildPlayerOptions playerOptions = new BuildPlayerOptions();
Expand Down

0 comments on commit 3f1cd1c

Please sign in to comment.