Exemple #1
0
 public static PoolSingleton getSingleton()
 {
     if (thesingleton == null)
     {
         GameObject g = new GameObject();
         g.AddComponent <PoolSingleton>();
         thesingleton = g.GetComponent <PoolSingleton>();
     }
     return(thesingleton);
 }
Exemple #2
0
 // Start is called before the first frame update
 void Start()
 {
     PoolSingleton.getSingleton().prefab1 = p1;
     PoolSingleton.getSingleton().prefab2 = p2;
 }