Пример #1
0
 void Awake()
 {
     pool = GameObject.Find("ScrapObjectPool").GetComponent <ScrapPool>();
     rb   = GetComponent <Rigidbody2D>();
 }
Пример #2
0
 private void Awake()
 {
     current    = this;
     ScrapArray = Resources.LoadAll <GameObject>("ScrapPrefabs") as GameObject[];
     CreatePool();
 }