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

VRApp works in the Editor but not in built using Linux #1110

Open
Hydran00 opened this issue Mar 13, 2024 · 1 comment
Open

VRApp works in the Editor but not in built using Linux #1110

Hydran00 opened this issue Mar 13, 2024 · 1 comment

Comments

@Hydran00
Copy link

Hydran00 commented Mar 13, 2024

Hi, I am currently trying to build a VR application for Linux using this plugin.
I loaded the Interactions_Example scene and it runs perfectly fine in the Editor: head movements are tracked perfectly together with controllers.
The problem is that I cannot see my controllers and also buttons do not work in the built Linux application. The only thing that works is the head movement tracking, so I am able to look around but I cannot do anything else.
Setup:

  • VR Headset: Meta Quest Pro connected through SteamVR using ALVR
  • Unity version: 22.3.21f1 ( I also tried with 2021.3.36f1 and I get the same result)
  • Linux OS: Ubuntu 22.04

Step to reproduce:

  1. Launch ALVR and connect your headset using SteamVR
  2. Open a new 3D Core Project in Unity
  3. Import the steam_vr custom package following com.valvesoftware.unity.openvr-1.2.1.tgz missing meta files #1107
  4. Toggle Initialize XR on Startup and OpenVR Loader in Edit -> Project Settings -> XR Plugin Management
  5. Set Stereo Rendering Module to Multipass and Mirror View Mode to Open VR in Edit -> Project Settings -> OpenVR
  6. Switch Graphics API to Vulkan for Linux in Edit -> Project Settings -> Player -> Rendering
  7. Generate SteamVR Inputs through Window -> SteamVR Input -> Save and generate
  8. Press play -> it works correctly
  9. Build app with File -> Build Settings -> Add Open Scenes then select Linux as Target Platform
  10. Launch compiled AppImage -> head movement is tracked but no controllers appear

Update:

I managed to isolate the problem but still no solution: if I run the app built in debug mode and open the generated log file I find:

...
	Editor App Name : 
[XR] 	Editor App Key : 
[XR] 	Action Manifest Path : /home/nardi/Build/VRTest2_Data/StreamingAssets/SteamVR/actions.json
[XR] 	Stereo Rendering Mode : Multi Pass
[XR] 	Initialization Type : Scene
[XR] 	Mirror View Mode : OpenVR View
[XR] [OpenVR] [path] /home/nardi/VRTest2
[XR] [OpenVR] [Error] Action manifest file does not exist at path (/home/nardi/VRTest2/Assets//home/nardi/Build/VRTest2_Data/StreamingAssets/SteamVR/actions.jsonore)
[XR] [OpenVR] startupInfo: { 
	"action_manifest_path": "/home/nardi/VRTest2/Assets//home/nardi/Build/VRTest2_Data/StreamingAssets/SteamVR/actions.jsonore"
}
...

And I noticed the incorrect path that seems to be a concatenation of two paths. It should be only /home/nardi/Build/VRTest2_Data/StreamingAssets/SteamVR/actions.jsonore. But I did not find a way to change this.

This seems to be the main issue because after some not-interesting debug lines there is a list of failures that probably are the reason why controllers are not spawning in the scene:

<b>[SteamVR]</b> GetInputSourceHandle (/unrestricted) error: NoData
UnityEngine.StackTraceUtility:ExtractStackTrace () (at /home/bokken/build/output/unity/unity/Runtime/Export/Scripting/StackTrace.cs:37)
UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
UnityEngine.Logger:Log (UnityEngine.LogType,object)
UnityEngine.Debug:LogError (object)
Valve.VR.SteamVR_Input_Source:Initialize () (at /home/nardi/VRTest2/Assets/SteamVR/Input/SteamVR_Input_Source.cs:70)
Valve.VR.SteamVR_Input:Initialize (bool) (at /home/nardi/VRTest2/Assets/SteamVR/Input/SteamVR_Input.cs:163)
Valve.VR.SteamVR:CreateInstance () (at /home/nardi/VRTest2/Assets/SteamVR/Scripts/SteamVR.cs:226)
Valve.VR.SteamVR:Initialize (bool) (at /home/nardi/VRTest2/Assets/SteamVR/Scripts/SteamVR.cs:122)
Valve.VR.SteamVR_Behaviour:InitializeSteamVR (bool) (at /home/nardi/VRTest2/Assets/SteamVR/Scripts/SteamVR_Behaviour.cs:119)
Valve.VR.SteamVR_Behaviour:Awake () (at /home/nardi/VRTest2/Assets/SteamVR/Scripts/SteamVR_Behaviour.cs:100)
...
other errors

@Hydran00
Copy link
Author

After several tests I finally managed to make it work.

The issue seems to be related to the generation of SteamVR inputs (step 7 of previous comment).

WORKAROUND:

I generated the inputs before opening the Interactions_Example and pressing Play.
If you directly press Play and then you accept the prompt for generating inputs you may face my issue.

My thought is that maybe there is a bug in the way paths to the actions.json are generated.

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