Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

SteamVR Unlocking teleport point in code

Discussion in 'VR' started by George_93, Feb 28, 2020.

  1. George_93

    George_93

    Joined:
    Jan 28, 2019
    Posts:
    11
    Is there a way to unlock a Teleport Point in SteamVR through code?
    Tried a few different approaches, but cannot find a solution.
     
  2. junsj

    junsj

    Joined:
    Apr 30, 2019
    Posts:
    1
    Hey George,
    I stumbled upon your question and was sad to find no answer. Eventually I found the method I needed right in the TeleportPoint script and called it:

    Code (CSharp):
    1. teleportPoint.GetComponent<TeleportPoint>().SetLocked(false);
    Where "teleportPoint" is a reference to the TeleportPoint GameObject you're trying to unlock.

    I hope this helps you.
    -J