teleport point的属性Teleport Type为Switch To New Scene,Switch To Scene属性面板跳转场景的名字。将要跳转的场景build在一起File -> Build Settings -> Scenes In Build,把相应的场景拖进去。还需要在Teleport Point脚本中添加一句代码:
//-------------------------------------------------
public void TeleportToScene()
{
if ( !string.IsNullOrEmpty( switchToScene ) )
{
SceneManager.LoadScene(switchToScene);
Debug.Log("<b>[SteamVR Interaction]</b> TeleportPoint: Hook up your level loading logic to switch to new scene: " + switchToScene );
}
else
{
Debug.LogError("<b>[SteamVR Interaction]</b> TeleportPoint: Invalid scene name to switch to: " + switchToScene );
}
}