diff --git a/Assets/Editor/BuildScript.cs b/Assets/Editor/BuildScript.cs index b63191c2..f64e024f 100644 --- a/Assets/Editor/BuildScript.cs +++ b/Assets/Editor/BuildScript.cs @@ -19,9 +19,28 @@ namespace UnityBuilderAction [MenuItem("File/Build Windows")] public static void StartWindows() { + string appName = PlayerSettings.productName; // Get filename. - string path = EditorUtility.SaveFolderPanel("Build out WINDOWS to...", "", ""); - Build( BuildTarget.StandaloneWindows, 0, path + "/" ); + string path = EditorUtility.SaveFilePanel("Build out WINDOWS to...", "", appName, "exe"); + Build( BuildTarget.StandaloneWindows, 0, path); + } + + [MenuItem("File/Build Linux")] + public static void StartLinux() + { + string appName = PlayerSettings.productName; + // Get filename. + string path = EditorUtility.SaveFilePanel("Build out LINUX to...", "", appName, ""); + Build( BuildTarget.StandaloneLinux64, 0, path); + } + + [MenuItem("File/Build Mac")] + public static void StartMac() + { + string appName = PlayerSettings.productName; + // Get filename. + string path = EditorUtility.SaveFilePanel("Build out MAC to...", "", appName, "app"); + Build( BuildTarget.StandaloneOSX, 0, path); } public static void Build() @@ -175,20 +194,16 @@ namespace UnityBuilderAction string[] scenes = EditorBuildSettings.scenes.Where(scene => scene.enabled).Select(s => s.path).ToArray(); string dataPath = ""; - string extension = ""; switch ( buildTarget ) { case BuildTarget.StandaloneWindows: case BuildTarget.StandaloneWindows64: - dataPath = $"{appName}_Data/"; - extension = ".exe"; + dataPath = $"_Data/"; break; case BuildTarget.StandaloneOSX: - dataPath = $"{appName}.app/Contents/"; - extension = ".app"; + dataPath = $".app/Contents/"; break; case BuildTarget.StandaloneLinux64: - dataPath = $"{appName}_Data/"; - extension = ".x86_64"; + dataPath = $"_Data/"; break; } @@ -197,14 +212,15 @@ namespace UnityBuilderAction scenes = scenes, target = buildTarget, // targetGroup = BuildPipeline.GetBuildTargetGroup(buildTarget), - locationPathName = filePath + $"{appName}{extension}", + locationPathName = filePath, // options = UnityEditor.BuildOptions.Development #if UNITY_2021_2_OR_NEWER subtarget = buildSubtarget #endif }; - string assetBundleDirectory = filePath + dataPath + "StreamingAssets"; + string buildDirectory = filePath.Substring(0, filePath.LastIndexOf('/')) + "/"; + string assetBundleDirectory = buildDirectory + appName + dataPath + "StreamingAssets"; if (!Directory.Exists(assetBundleDirectory)) { Directory.CreateDirectory(assetBundleDirectory); diff --git a/Assets/Scripts/AppInfo.cs b/Assets/Scripts/AppInfo.cs index 6588e641..41266c2b 100644 --- a/Assets/Scripts/AppInfo.cs +++ b/Assets/Scripts/AppInfo.cs @@ -1,8 +1,8 @@ using System; public static class AppInfo { - public const string Version = "0.0.978"; - public static readonly DateTime Date = new DateTime(2023, 06, 18, 21, 34, 16, 868, DateTimeKind.Utc); + public const string Version = "0.0.981"; + public static readonly DateTime Date = new DateTime(2023, 06, 19, 03, 38, 42, 219, DateTimeKind.Utc); } diff --git a/Packages/packages-lock.json b/Packages/packages-lock.json index 75730dd1..2c10774d 100644 --- a/Packages/packages-lock.json +++ b/Packages/packages-lock.json @@ -5,9 +5,10 @@ "depth": 0, "source": "git", "dependencies": { - "com.unity.nuget.newtonsoft-json": "3.2.1" + "com.unity.nuget.newtonsoft-json": "3.2.1", + "jillejr.newtonsoft.json-for-unity.converters": "1.5.1" }, - "hash": "fd70aafabe1e0388c717a873b7739ba7f2d5421d" + "hash": "2fb235a6da261fb1ae60112f9e9ba0d924e96bb8" }, "com.unity.2d.sprite": { "version": "1.0.0", @@ -119,8 +120,8 @@ } }, "jillejr.newtonsoft.json-for-unity.converters": { - "version": "1.3.0", - "depth": 0, + "version": "1.5.1", + "depth": 1, "source": "registry", "dependencies": {}, "url": "https://npm.cloudsmith.io/jillejr/newtonsoft-json-for-unity" diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index 44326601..41869637 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -134,7 +134,7 @@ PlayerSettings: 16:10: 1 16:9: 1 Others: 1 - bundleVersion: 0.0.978 + bundleVersion: 0.0.981 preloadedAssets: - {fileID: 102900000, guid: 5348c08b82446e0478cee8bda6c02cfc, type: 3} metroInputSource: 0 @@ -158,11 +158,11 @@ PlayerSettings: applicationIdentifier: Standalone: com.RHeavenStudio.Heaven-Studio buildNumber: - Standalone: 978 + Standalone: 981 iPhone: 0 tvOS: 0 overrideDefaultApplicationIdentifier: 0 - AndroidBundleVersionCode: 978 + AndroidBundleVersionCode: 981 AndroidMinSdkVersion: 22 AndroidTargetSdkVersion: 0 AndroidPreferredInstallLocation: 1