void Awake() { Instance = this; if (ObjectPools == null) { ObjectPools = new List <ObjectPool>(); } for (int i = 0; i < ObjectPools.Count; i++) { if (ObjectPools[i].Prefab == null) { continue; } if (!ObjectPools[i].IsInitialized) { ObjectPools[i].Initialize(ObjectPools[i].Prefab, transform); } } }
void Awake() { Instance = this; if ( ObjectPools == null ) ObjectPools = new List<ObjectPool>(); for ( int i = 0; i < ObjectPools.Count; i++ ) { if ( ObjectPools[ i ].Prefab == null ) continue; if ( !ObjectPools[ i ].IsInitialized ) ObjectPools[ i ].Initialize( ObjectPools[ i ].Prefab, transform ); } }