Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Unity to determine platform instead of dotnet #90

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Reactor.Benchmarks/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -1152,4 +1152,4 @@
}
}
}
}
}
2 changes: 1 addition & 1 deletion Reactor.Example/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -922,4 +922,4 @@
}
}
}
}
}
23 changes: 6 additions & 17 deletions Reactor/Utilities/AssetBundleManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,24 +33,13 @@ public static class AssetBundleManager
/// <returns>Target name of the current system.</returns>
public static string GetTargetName(bool includeArchitecture)
{
string operatingSystem;

if (OperatingSystem.IsWindows())
{
operatingSystem = "win";
}
else if (OperatingSystem.IsLinux())
{
operatingSystem = "linux";
}
else if (OperatingSystem.IsAndroid())
var operatingSystem = Application.platform switch
{
operatingSystem = "android";
}
else
{
throw new PlatformNotSupportedException();
}
RuntimePlatform.WindowsPlayer or RuntimePlatform.WSAPlayerX86 => "win",
RuntimePlatform.LinuxPlayer or RuntimePlatform.OSXPlayer => "linux",
RuntimePlatform.Android => "android",
_ => throw new PlatformNotSupportedException(),
};

if (!includeArchitecture)
{
Expand Down