Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

how to restart a scene in unity

using UnityEngine;
using UnityEngine.SceneManagement;
public class RestartSceneExample : MonoBehaviour
{
	void Start
    {
    	SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex)//Load the current scene
	}
{
Comment

PREVIOUS NEXT
Code Example
Csharp :: unity load current scene 
Csharp :: c# yes or no dialog 
Csharp :: c# print hello world 
Csharp :: unity change tag in script 
Csharp :: unity quit in edtor 
Csharp :: c# store byte array as string 
Csharp :: net core get remote ip 
Csharp :: ngrok for asp.net core 
Csharp :: c# writeline debug 
Csharp :: check if gameobject is active 
Csharp :: c# replace crlf 
Csharp :: create or update in laaravel 
Csharp :: c# if file exists 
Csharp :: unity to integer 
Csharp :: restclient basic auth c# 
Csharp :: c# serialize json 
Csharp :: left moust click unity 
Csharp :: unity check if key pressed 
Csharp :: c# wait seconds 
Csharp :: c# int to bool 
Csharp :: new Color from hex in unity 
Csharp :: how to change particle system rate over time unity 
Csharp :: check animation end unity 
Csharp :: unity get gameobject script is attached to 
Csharp :: load scene unity 
Csharp :: how to write blank lines in c#.net 
Csharp :: c# write to console 
Csharp :: c# declare empty string array 
Csharp :: how to find how much digits in number c# 
Csharp :: how to usefor loop in c# 
ADD CONTENT
Topic
Content
Source link
Name
8+7 =