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.c...
Subscribe to my Second Channel:
/ @lachlanshelton129
Join my Discord:
/ discord
Facebook Page:
/ omogonix
Follow me on Instagram:
/ uwugonixhalo
Itch.io:
omogonixlachla...
Music Used:
-Ship Wrek & Zookeepers - Ark (NCS Release):
• Ship Wrek & Zookeepers...
7 сен 2024