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

ERROR: Building for platform StandaloneLinux64 is not yet supported #3

Open
brmassa opened this issue Jan 31, 2025 · 0 comments
Open

Comments

@brmassa
Copy link

brmassa commented Jan 31, 2025

Using the plugin while the target is Linux generates a dozen error messages per second. It will also be valid on any other platform Unity allows and is not listed here (console, vr, mac...).

private string GetBuildPath(bool fullPath = true) {
			try {
				var dict = _buildPathDict.ToDictionary(pair => pair.Key, pair => pair.Value.parameter);
				var path = Smart.Format(build.editorSettings.buildPathScheme.Replace("\\", "/"),
					dict
				);
				if (fullPath)
					switch (EditorUserBuildSettings.activeBuildTarget) {
						case BuildTarget.StandaloneWindows:
						case BuildTarget.StandaloneWindows64:
							path += $"/{Application.productName.ReplaceUnsupportedSymbols()}.exe";
							break;
						case BuildTarget.Android:
							path += ".apk";
							break;
						case BuildTarget.iOS:
							break;
						default:
							throw new NotImplementedException(
								$"Building for platform {EditorUserBuildSettings.activeBuildTarget} is not yet supported, " +
								"feel free to write an Issue or contribute: https://github.com/Hermesiss/unity-buildplus");
					}
				return Path.GetFullPath(path.ReplaceMultiple('_'));
			}
			catch (Exception e) {
				Debug.LogError(e);
				return $"ERROR: {e}";
			}
		}

Suggestion for quick fix: before calling GetBuildPath, create a IsPlatformValid() that returns true if the platform is among the ones you do something (i also believe linux might be easy to implement).

{
					switch (EditorUserBuildSettings.activeBuildTarget) {
						case BuildTarget.StandaloneWindows:
						case BuildTarget.StandaloneWindows64:
						case BuildTarget.Android:
return true;
						default:
return false;
}

Or investigate a way to obtain similar information from the build-settings (the settings used when building manually)

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant