|
@@ -5,10 +5,10 @@ using System.IO;
|
|
|
using System.Collections;
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
-public class BuildForAllPlatforms
|
|
|
+public class BuildForAllPlatforms : EditorWindow
|
|
|
{
|
|
|
- // private static int versionCode = 1;
|
|
|
- // private static string version = "1.0.0";
|
|
|
+ private static int versionCode = 1;
|
|
|
+ private static string version = "1.0.0";
|
|
|
private static string gameName = "MyLovelyGarden";
|
|
|
private static string companyName = "DashGame Technology Inc.";
|
|
|
private static ApiCompatibilityLevel apiCompatLevel = ApiCompatibilityLevel.NET_2_0;
|
|
@@ -24,7 +24,34 @@ public class BuildForAllPlatforms
|
|
|
private static string androidBundleIdentifier = "com.dashgame.garden";
|
|
|
private static AndroidSdkVersions androidMinSdk = AndroidSdkVersions.AndroidApiLevel16; // Jellybean;
|
|
|
|
|
|
- [MenuItem("DashGame/Player/Build Win32")]
|
|
|
+ [MenuItem("DashGame/PlayerBuilder")]
|
|
|
+ private static void ShowWindow()
|
|
|
+ {
|
|
|
+ versionCode = PlayerSettings.Android.bundleVersionCode;
|
|
|
+ version = PlayerSettings.bundleVersion;
|
|
|
+
|
|
|
+ // Get existing open window or if none, make a new one:
|
|
|
+ BuildForAllPlatforms window = (BuildForAllPlatforms)EditorWindow.GetWindow(typeof(BuildForAllPlatforms), false, "Player Builder");
|
|
|
+ window.Show();
|
|
|
+ }
|
|
|
+
|
|
|
+ void OnGUI()
|
|
|
+ {
|
|
|
+ version = EditorGUILayout.TextField("Version", version);
|
|
|
+ versionCode = int.Parse(EditorGUILayout.TextField("VersionCode", versionCode.ToString()));
|
|
|
+
|
|
|
+ if (GUILayout.Button("Android", GUILayout.Height(30)))
|
|
|
+ BuildAndroid();
|
|
|
+ if (GUILayout.Button("iOS", GUILayout.Height(30)))
|
|
|
+ BuildiOS();
|
|
|
+ if (GUILayout.Button("iOS Debug", GUILayout.Height(30)))
|
|
|
+ BuildiOSDebug();
|
|
|
+ if (GUILayout.Button("Win32", GUILayout.Height(30)))
|
|
|
+ BuildWin32();
|
|
|
+ if (GUILayout.Button("OSX 64", GUILayout.Height(30)))
|
|
|
+ BuildOSX64();
|
|
|
+ }
|
|
|
+
|
|
|
public static void BuildWin32()
|
|
|
{
|
|
|
// Get build path
|
|
@@ -41,7 +68,6 @@ public class BuildForAllPlatforms
|
|
|
);
|
|
|
}
|
|
|
|
|
|
- [MenuItem("DashGame/Player/Build OSX 64")]
|
|
|
public static void BuildOSX64()
|
|
|
{
|
|
|
// Get build path
|
|
@@ -65,7 +91,6 @@ public class BuildForAllPlatforms
|
|
|
);
|
|
|
}
|
|
|
|
|
|
- [MenuItem("DashGame/Player/Build iOS")]
|
|
|
public static void BuildiOS()
|
|
|
{
|
|
|
// Get build path
|
|
@@ -95,7 +120,6 @@ public class BuildForAllPlatforms
|
|
|
);
|
|
|
}
|
|
|
|
|
|
- [MenuItem("DashGame/Player/Build iOS Debug")]
|
|
|
public static void BuildiOSDebug()
|
|
|
{
|
|
|
// Get build path
|
|
@@ -125,7 +149,6 @@ public class BuildForAllPlatforms
|
|
|
);
|
|
|
}
|
|
|
|
|
|
- [MenuItem("DashGame/Player/Build Android")]
|
|
|
public static void BuildAndroid()
|
|
|
{
|
|
|
// Get build path
|