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

Unity XR problem at runtime.

Discussion in 'AR/VR (XR) Discussion' started by Archi_16, Jun 16, 2020.

  1. Archi_16

    Archi_16

    Joined:
    Apr 7, 2017
    Posts:
    87
    HI all. Im trying to make multiplayer game with Unity XR toolkit.
    I made simple player prefab with hands, and teleportation function.

    The problem is, when i'm instantiating the player prefab at runtime, teleportation not working. I can throw the ray(with Ray Interactor), it shows where i will be teleported, but releasing button not teleporting me.

    When the same prefab in scene(before "Play"), then everything works great.

    Have you any ideas why it is not working, and how to solve it?
     
    Last edited: Jun 16, 2020
  2. a436t4ataf

    a436t4ataf

    Joined:
    May 19, 2013
    Posts:
    1,924
    Sounds like you need to read the docs for your networking library/framework, and learn how to use it without the automatic features it has. Most networking libraries try to hide the work from you (Which is wrong, but they nearly all do it), and so they break as soon as you use them with new code that the networking-authors didn't think of / didn't test for.

    I'm betting that "VR" is one of the things the networking authors never thought of, and definitely haven't tested / added support for. So your networking code is probabl ignoring it, and needs to be updated/rewritten.
     
  3. Archi_16

    Archi_16

    Joined:
    Apr 7, 2017
    Posts:
    87

    What i described, it was not in multiplayer yet. When im instantiating player prefab at run time, some teleportation XR plugin not working. so it is XR problem not multiplayer.
     
  4. a436t4ataf

    a436t4ataf

    Joined:
    May 19, 2013
    Posts:
    1,924
    You need to describe a lot more clearly what you've actually done, what you've actually tested, what actually happened, etc. You're only giving very vague descriptions, leaving us to guess.
     
  5. Archi_16

    Archi_16

    Joined:
    Apr 7, 2017
    Posts:
    87
    I create Player prefab. with only teleportation sistem, and hands. Teleportation can be done by pressing Primary button(Press to aim, release to teleport). XR interaction Manager is in scene, so other modules gets it when play pressed.

    I remove Player prefab from scene (Leaving XR Manager there) and press start. when game started i drag and drop player prefab into scene. All modules getting XR interaction Manager. but in this case i can aim by pressing primary button. but after releasing it, teleportation not working. There is no errors and warnings.

    thats it. what i tried -
    Removed XR interaction manager - in this case it is creating automatically, when i drop player prefab in scene.
    enabled disbaled all modules at runtime. but nothing helps
     
  6. BenWilliams_

    BenWilliams_

    Joined:
    Jun 23, 2020
    Posts:
    1
    Hey. Did you manage to fix this issue? I am having the same problem
     
  7. DriesVrBase

    DriesVrBase

    Joined:
    Mar 24, 2020
    Posts:
    64
    Having the same issue here, did you fix it?
     
  8. Turisas

    Turisas

    Joined:
    Jul 11, 2012
    Posts:
    7
  9. faultanxiety

    faultanxiety

    Joined:
    Jul 14, 2023
    Posts:
    2
    I seem to have the same problem again with no fix. I still can't teleport when I set the TeleportationProvider after the player is initialized.

     
  10. DarkSoulsBoss2

    DarkSoulsBoss2

    Unity Technologies

    Joined:
    Mar 24, 2023
    Posts:
    22