Setting a Custom Exit Position for a VRCStation (stationExitPlayerLocation)
How It Works:
using UdonSharp;
using UnityEngine;
using VRC.SDKBase;
using VRC.Udon;
using VRC.SDK3.Components;
public class CustomExitPoint : UdonSharpBehaviour
{
public VRCStation station; // Assign a VRCStation in the Inspector
public Transform exitPoint; // Assign a Transform in the Inspector
public override void Interact()
{
if (station != null && exitPoint != null)
{
station.stationExitPlayerLocation = exitPoint;
Debug.Log("Player exit point set to: " + exitPoint.position);
}
else
{
Debug.LogWarning("Missing station or exit point transform.");
}
}
}
Last updated