Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save deadasadodo/f3c6ac349b33d6a9b8e23efc4e2ed049 to your computer and use it in GitHub Desktop.
Save deadasadodo/f3c6ac349b33d6a9b8e23efc4e2ed049 to your computer and use it in GitHub Desktop.
//list you player as player and list the cube you whant to teleport with is trigger
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class next : MonoBehaviour
{
private void OnTriggerEnter(Collider other)
{
SceneManager.LoadScene(2);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment