コード例 #1
0
ファイル: PoolingExt.cs プロジェクト: VergilUa/zPooling
 /// <summary>
 /// Performs pooled instantiation on a specific prefab, and returns requested T MonoBehaviour from it
 /// This one passes to AutoPooler instead (which automatically checks if object is .IsAvaiable)
 /// </summary>
 /// <param name="prefab">GameObject prefab</param>
 /// <returns>Instantiated object</returns>
 public static T AutoPool <T>(this GameObject prefab) where T : MonoBehaviour, IGenericPoolElement
 {
     return(AutoPooler.InstantiateFromPool <T>(prefab));
 }