Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Steam Interaction System, teleport to new scene

Discussion in 'AR/VR (XR) Discussion' started by Sam00, Apr 13, 2017.

  1. Sam00

    Sam00

    Joined:
    Mar 29, 2014
    Posts:
    7
    Hi,


    Do you use the Steam VR Interaction System?


    I would like to know how to teleport players in new scenes using the teleporters? I saw that you could switch between "move to location" and "switch to new scene". When I try to teleport to a new scene, I have the message: "Hook up your level loading logic to switch to new scene".
     
  2. MaartenB

    MaartenB

    Joined:
    Nov 6, 2014
    Posts:
    67
    Not sure, but that maybe has to do with the "Build Settings" you've set-up. Are you sure that the new scene is in the Build Settings?
     
  3. zkidx

    zkidx

    Joined:
    Sep 4, 2017
    Posts:
    1
    Hi, i have encountered the same problem as well. The new scene is in the build settings. However, i cant seem to teleport to a new scene.
     
  4. mikeIsobar

    mikeIsobar

    Joined:
    Feb 2, 2018
    Posts:
    2
    It looks like you need to override the TeleportToScene in TeleportPoint to add your own scene loading logic. But it doesn't make sense why they would both to "half" implement it in that case. Why even give us a text field and basic error checking for scene name if it can't possibly do something.
     
  5. Aralc

    Aralc

    Joined:
    Sep 26, 2018
    Posts:
    1
    I am having the same problem. Did you find a solution? How do I override the TeleportToScene in the TeleportPoint script?
     
  6. brewthom

    brewthom

    Joined:
    Sep 1, 2019
    Posts:
    5
    Did anyone find a solution to this? I read that it needs to rely on your scene manager--- but I can't find info on that!
     
  7. Timps

    Timps

    Joined:
    Jun 23, 2017
    Posts:
    11
    You'll need to add in your own code in that spot to load the new level in.
    So you edit the Teleport Point script and replace the console message.

    SteamVR provides a function SteamVR_LoadLevel you need to use, and the value listed in the editor comes in as "switchToScene" as a string.
     
    zoeyducoeur likes this.
  8. zoeyducoeur

    zoeyducoeur

    Joined:
    Dec 25, 2020
    Posts:
    2
    In the TeleportPoint.cs add SceneManager.LoadScene(switchToScene); to line 229 in TeleportToScene() then add using UnityEngine.SceneManagement; to the top