Answers for "unity singleton interface?"

C#
4

how to make a singleton in unity

void Awake()
 {
   if (instance == null)
     instance = this;
   else if (instance != this)
     Destroy(gameObject);
 }
Posted by: Guest on November-03-2020

C# Answers by Framework

Browse Popular Code Answers by Language