Exemple #1
0
        private void InitTeleportListener(bool state)
        {
            // Listen for teleport events
            VRTK_BasicTeleport teleportComponent = GetComponent <VRTK_BasicTeleport>();

            if (teleportComponent)
            {
                if (state)
                {
                    teleportComponent.Teleporting += new TeleportEventHandler(OnTeleport);
                }
                else
                {
                    teleportComponent.Teleporting -= new TeleportEventHandler(OnTeleport);
                }
            }
        }
 private void OnEnable()
 {
     basicTeleport = GetComponent <VRTK_BasicTeleport>();
     StartCoroutine(EnableAtEndOfFrame());
 }