Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

unity dontdestroyonload

private void Awake(){
	if(instance == null){
		instance = this;
    	DontDestroyOnLoad(instance);
	}
	else{
		Destroy(gameObject)
	}
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: unity lock cursor to center 
Csharp :: unity get child 
Csharp :: print in c# unity 
Csharp :: c# datetime now timestamp 
Csharp :: Unity asset storre download forlder 
Csharp :: unity remove parent 
Csharp :: what type of variable is true or false in c# 
Csharp :: c# class to byte array 
Csharp :: unity custom editor save changes 
Csharp :: nearest greater to right 
Csharp :: how to make teleporter in unity 
Csharp :: c# check if string is only letters and numbers 
Csharp :: c# clear a textbox 
Csharp :: bootstrap distane between col 
Csharp :: bootstrap modal popup 
Csharp :: C# get string as stream 
Csharp :: wpf restart application c# 
Csharp :: compare two binary tree 
Csharp :: .net mvc c# alert to client browswer window 
Csharp :: difference between while and do while in c# 
Csharp :: round float c# 
Csharp :: unity target frame rate 
Csharp :: httppostedfilebase in .net core 3.1 
Csharp :: c# number in range 
Csharp :: how to use distinct in linq query in c# 
Csharp :: how to access individual characters in a string in c# 
Csharp :: reverse string c# 
Csharp :: get current assembly path c# 
Csharp :: csharp sleep code 1 second 
Csharp :: unity how to get a child from a gameobject 
ADD CONTENT
Topic
Content
Source link
Name
7+3 =