Hash Studios Teleporter System
A simple multi-destination teleporter system for hub and event worlds.
Category: Interaction Systems
UdonSharp Script
using UdonSharp;
using UnityEngine;
using VRC.SDKBase;
using VRC.Udon;
public class HashStudiosTeleporterSystem : UdonSharpBehaviour
{
public Transform[] destinations;
public int destinationIndex;
public override void Interact()
{
VRCPlayerApi localPlayer = Networking.LocalPlayer;
if (localPlayer == null || destinations == null) return;
if (destinationIndex < 0 || destinationIndex >= destinations.Length) return;
Transform target = destinations[destinationIndex];
if (target == null) return;
localPlayer.TeleportTo(
target.position,
target.rotation,
VRC_SceneDescriptor.SpawnOrientation.AlignPlayerWithSpawnPoint,
true
);
}
}
Setup
- Add script to a teleporter button/pad object.
- Assign destination transforms.
- Set
destinationIndexper teleporter object. - Add
VRC_Interactable.
Tips
- Use separate teleporter objects for each destination.
- Pair with signs/icons so users know where each portal goes.
- Keep destination landing areas uncluttered.
Related Content
Prefab Setup Notes
Import the prefab or script into a throwaway test scene before adding it to a live world. Confirm inspector references, ownership behavior, sync, triggers, UI hooks, and audio or object links before moving it into the production scene.
Testing Checklist
- Test once as a local player and again with a second client or late joiner if the behavior can affect more than one player.
- Confirm ownership, sync, trigger zones, UI references, and audio or object references are assigned intentionally.
- Check desktop and VR interaction distance so players can actually use the feature in context.
- Keep a backup of the scene before changing prefabs, UdonBehaviours, or serialized references.
