Рет қаралды 30,756
In this Unity tutorial, I show you all how to change scenes in Unity using C#.
Script:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class nextscene : MonoBehaviour
{
public string scenename;
void OnTriggerEnter(Collider other){
if(other.CompareTag("Player")){
SceneManager.LoadScene(scenename);
}
}
}
Follow me on Twitter:
/ omogonix
Forgehub:
www.forgehub.com/members/omog...
Subscribe to my Second Channel:
/ @lachlanshelton129
Join my Discord:
/ discord
Facebook Page:
/ omogonix
Follow me on Instagram:
/ uwugonixhalo
Itch.io:
omogonixlachlan.itch.io
Music Used:
-Ship Wrek & Zookeepers - Ark (NCS Release):
• Ship Wrek & Zookeepers...