Answers for "unity how to use dontdestroyonload"

C#
0

unity dontdestroyonload

private void Awake(){
	if(instance == null){
		instance = this;
    	DontDestroyOnLoad(instance);
	}
	else{
		Destroy(gameObject)
	}
}
Posted by: Guest on January-16-2021

Code answers related to "unity how to use dontdestroyonload"

C# Answers by Framework

Browse Popular Code Answers by Language