Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Problem with VR project and WebGL

Discussion in 'AR/VR (XR) Discussion' started by Jichaels, Dec 27, 2018.

  1. Jichaels

    Jichaels

    Joined:
    Dec 27, 2018
    Posts:
    237
    Hello guys, first time here :D

    I'm currently working on a rather small project in VR (which can be deactivated with a config file). Everything works pretty fine but as I can enable/disable VR I wanted to build to WebGL aswell. I know that VR and WebGL is a mess, and I don't want to go further into that and will stick to non VR for the WebGL build.

    I've currently two problems :

    - I use two config files (basic .txt file with var=value) that are parsed at the beggining to assign different value (player speed, rotation ratchet, and if VR is enabled or not basically). With a standalone build, I just have to c/c my files in the Application/Data and it works great. But for the WebGL build, as the path are not the same, I don't know where I should put my config files (can I even do this ?)

    - Second problem, when I launch the app in WebGL (and only WebGL), my character just instantly fall through the floor. Player's rigibody's collisions detection is set to continuous dynamic so it shouldn't be that the collision is not detected. What could cause that to happens only when I build to WebGL ?

    I don't know if any code is needed for my questions, but feel free to ask for code/screenshot if it could help, I still can't find a solution myself, so if someone had this probem before that would be neat !

    Thanks guys