mirror of
https://github.com/storytold/RuntimeFilesDownloader.git
synced 2026-10-18 07:33:14 +00:00
add documentation and minor design changes
This commit is contained in:
+1
-2
@@ -27,7 +27,6 @@ URuntimeFilesDownloaderBPLibrary* URuntimeFilesDownloaderBPLibrary::CreateDownlo
|
|||||||
|
|
||||||
URuntimeFilesDownloaderBPLibrary* URuntimeFilesDownloaderBPLibrary::DownloadFile(const FString& URL, FString SavePath)
|
URuntimeFilesDownloaderBPLibrary* URuntimeFilesDownloaderBPLibrary::DownloadFile(const FString& URL, FString SavePath)
|
||||||
{
|
{
|
||||||
URuntimeFilesDownloaderBPLibrary* Downloader = NewObject<URuntimeFilesDownloaderBPLibrary>();
|
|
||||||
FileUrl = URL;
|
FileUrl = URL;
|
||||||
FileSavePath = SavePath;
|
FileSavePath = SavePath;
|
||||||
|
|
||||||
@@ -45,7 +44,7 @@ URuntimeFilesDownloaderBPLibrary* URuntimeFilesDownloaderBPLibrary::DownloadFile
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
void URuntimeFilesDownloaderBPLibrary::OnReady(FHttpRequestPtr Request, FHttpResponsePtr Response, bool bWasSuccessful)
|
void URuntimeFilesDownloaderBPLibrary::OnReady_Internal(FHttpRequestPtr Request, FHttpResponsePtr Response, bool bWasSuccessful)
|
||||||
{
|
{
|
||||||
RemoveFromRoot();
|
RemoveFromRoot();
|
||||||
Request->OnProcessRequestComplete().Unbind();
|
Request->OnProcessRequestComplete().Unbind();
|
||||||
|
|||||||
+2
-2
@@ -72,11 +72,11 @@ public:
|
|||||||
* @return Returns itself.
|
* @return Returns itself.
|
||||||
*/
|
*/
|
||||||
UFUNCTION(BlueprintCallable, Category = "RuntimeFilesDownloader")
|
UFUNCTION(BlueprintCallable, Category = "RuntimeFilesDownloader")
|
||||||
URuntimeFilesDownloaderBPLibrary* DownloadFile(const FString & URL, FString SavePath);
|
URuntimeFilesDownloaderBPLibrary* DownloadFile_Internal(const FString & URL, FString SavePath);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
void OnReady(FHttpRequestPtr Request, FHttpResponsePtr Response, bool bWasSuccessful);
|
void OnReady_Internal(FHttpRequestPtr Request, FHttpResponsePtr Response, bool bWasSuccessful);
|
||||||
void OnProgress_Internal(FHttpRequestPtr Request, int32 BytesSent, int32 BytesReceived);
|
void OnProgress_Internal(FHttpRequestPtr Request, int32 BytesSent, int32 BytesReceived);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user