Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

Change Level in Unity

public UnityEngine.UI.InputField sceneInputField; //Refence to your inputField

public void ChangeSceneBasedOnInputField() //Code that needs to be called
 {
      UnityEngine.SceneManagement.SceneManager.LoadScene(sceneInputField.text);  
     //This way you can type either the index of the scene or it's name
     //Will throw an error if it can`t find the scene
} 
Comment

PREVIOUS NEXT
Code Example
Csharp :: c# use api rest 
Csharp :: ternary operator c# 
Csharp :: asp.net 5 iis HTTP Error 500.19 - Internal Server Error 
Csharp :: c# calculate sum of list 
Csharp :: how to print statement in c# 
Csharp :: what is reflection in programming 
Csharp :: increase value in dictionary against a key in c# 
Csharp :: unity notification 
Csharp :: asp.net core api Self referencing loop detected for property 
Csharp :: c# get function name 
Csharp :: change size of a unity object 
Csharp :: c# .net 3.5 post json httpclient 
Csharp :: c# Predicate delegate 
Csharp :: Edit file C# 
Csharp :: unity gui style color button 
Csharp :: list min and Max value in c# 
Csharp :: remove force unity 
Csharp :: c# sort int array 
Csharp :: unity game object remove parent 
Csharp :: convert number of days into months c# 
Csharp :: how to make a 3d object do something when clicked on 
Csharp :: unity respawn 
Csharp :: how to trim path in C# 
Csharp :: rigidbody.addforce not working 
Csharp :: tostring format 2 decimals 
Csharp :: XMLWriter write xml C# 
Csharp :: microsoft forms create bitmap 
Csharp :: visitor pattern 
Csharp :: how to sort a dictionary by value in c# 
Csharp :: preprocessors in c# 
ADD CONTENT
Topic
Content
Source link
Name
9+3 =