mirror of
https://github.com/RHeavenStudioPlus/HeavenStudioPlus.git
synced 2024-11-24 18:45:15 +00:00
fix filename / filepaths
add build mac / build linux to editor update packages
This commit is contained in:
parent
5ee2ba6464
commit
e250cc7ecb
4 changed files with 37 additions and 20 deletions
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue