public static T Spawn <T>(this IPrefabPoolService service, T prefabComponent) where T : Component { return(service.Spawn(prefabComponent.gameObject, null, Vector3.zero, Quaternion.identity).GetComponent <T>()); }
public static void Recycle <T>(this IPrefabPoolService service, T targetComponent) where T : Component { service.Recycle(targetComponent.gameObject); }
public static T Spawn <T>(this IPrefabPoolService service, T prefabComponent, Vector3 position, Quaternion rotation) where T : Component { return(service.Spawn(prefabComponent.gameObject, null, position, rotation).GetComponent <T>()); }
public static T Spawn <T>(this IPrefabPoolService service, T prefabComponent, Transform parent, Vector3 position) where T : Component { return(service.Spawn(prefabComponent.gameObject, parent, position, Quaternion.identity).GetComponent <T>()); }
public static GameObject Spawn(this IPrefabPoolService service, Prefab prefab) { return(service.Spawn(prefab, null, Vector3.zero, Quaternion.identity)); }
public static GameObject Spawn(this IPrefabPoolService service, Prefab prefab, Vector3 position, Quaternion rotation) { return(service.Spawn(prefab, null, position, rotation)); }
public static GameObject Spawn(this IPrefabPoolService service, Prefab prefab, Transform parent) { return(service.Spawn(prefab, parent, Vector3.zero, Quaternion.identity)); }