Im trying to build gameservers for various VR applications. Part of the process was for me to build a linux dedicated server and then put that into a container image and run it on kubernetes. But when i use OpenXR it doesnt work.
I get the following error.
The only standalone targets supported are Windows x64 and OSX with OpenXR. Other architectures and operating systems are not supported at this time.
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&) (at /home/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs:190)
How can i continue to use linux dedicated server???
Make your server executable not depend on the OpenXR package. The server doesn’t need it since it’s not actually performing XR tasks.
To do so you have to fiddle with assembly definitions to make the server-only codebase not depend on XR. Ideally also using asset/code stripping (see Dedicated Server package => Multiplayer Roles).
It may be hard to strip the package due to some dependencies,
And nobody at Unity really cares, it seems
So I made a temporary fix for this (hopefully temporary)
public class OpenXRValidationRuleFixer : IPreprocessBuildWithReport
{
public int callbackOrder => -100;
public void OnPreprocessBuild(BuildReport report)
{
var field = typeof(OpenXRProjectValidation).GetField("BuiltinValidationRules", BindingFlags.NonPublic | BindingFlags.Static);
if (field == null || field.GetValue(null) is not OpenXRFeature.ValidationRule[] rules || rules.Length == 0)
return;
foreach (var rule in rules)
{
if (rule.message != null && rule.message.Contains("The only standalone targets supported are Windows x64 and OSX with OpenXR"))
{
rule.checkPredicate = () => true;
}
}
field.SetValue(null, rules);
}
}
Same issue on Unity 6.2.14f1
Trying to make a server build using: Fishnet + Playflow servers. I am making a crossplatform game with VR and PC.
The only standalone targets supported are Windows x64 and OSX with OpenXR. Other architectures and operating systems are not supported at this time. UnityEditor.BuildPipeline:BuildPlayer (UnityEditor.BuildPlayerOptions) PlayFlowBuilder:BuildServer (bool,System.Collections.Generic.List`1) (at ./Library/PackageCache/com.playflow.multiplayer-unity-sdk@6c7a61261e8a/Editor/PlayFlowBuilder.cs:57) PlayFlow.SDK.Editor.PlayFlowCloudDeploy:OnUploadPressed () (at ./Library/PackageCache/com.playflow.multiplayer-unity-sdk@6c7a61261e8a/Editor/PlayFlowCloudDeploy.cs:332) UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
Linux dedicated server builds don’t support OpenXR in Unity. OpenXR requires a graphics/XR runtime, which headless servers don’t have. Solution: disable/remove OpenXR (and all XR plugins) for the server build and keep it only in VR client builds (Windows/macOS). Server should run gameplay + networking only.