What does "this" indicate in the else part of MusicPlayer.cs

else{
		instance = this;
		GameObject.DontDestroyOnLoad(gameObject);
		}

Hello Manthan, welcome to the community.

this refers to the instance of the class itself.

Hope this helps :slight_smile:


See also;

Privacy & Terms