public static GameObject SpwanObject(this GameObject obj, int poolIndex, Vector3 pos, Quaternion quat) { var go = SimpleObjectPool.Instacne.objectList[poolIndex].prefab; return(SimpleObjectPool.SpawnPoolObject(go, pos, quat)); }
public static GameObject SpwanObject <T>(this T obj, Vector3 pos, Quaternion quat) where T : Component { return(SimpleObjectPool.SpawnPoolObject(obj.gameObject, pos, quat)); }