mirror of
https://github.com/NuclearPowered/Reactor.git
synced 2026-10-19 15:51:54 +00:00
Add support for asset bundles without an architecture suffix
Unity requires specifying the architecture when building asset bundles as part of BuildTarget. While compatibility between targets isn't guaranteed, in practice there are no differences between architectures. <!-- ps-id: 49397d5b-21fc-4201-a0d6-e0c2f9627bf3 -->
This commit is contained in:
3 files changed
+67
-35
No files matched your search
@@ -69,14 +69,14 @@ internal static class Build
|
||||
}
|
||||
}
|
||||
|
||||
private static string GetTargetName(BuildTarget target)
|
||||
private static string GetTargetName(BuildTarget target, bool includeArchitecture = false)
|
||||
{
|
||||
return target switch
|
||||
{
|
||||
BuildTarget.StandaloneWindows => "win-x86",
|
||||
BuildTarget.StandaloneWindows64 => "win-x64",
|
||||
BuildTarget.StandaloneWindows => includeArchitecture ? "win-x86" : "win",
|
||||
BuildTarget.StandaloneWindows64 => includeArchitecture ? "win-x64" : "win",
|
||||
BuildTarget.Android => "android",
|
||||
BuildTarget.StandaloneLinux64 => "linux-x64",
|
||||
BuildTarget.StandaloneLinux64 => includeArchitecture ? "linux-x64" : "linux",
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(target), target, null),
|
||||
};
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user