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