mirror of
https://github.com/storytold/RuntimeFilesDownloader.git
synced 2026-10-09 00:09:42 +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* Downloader = NewObject<URuntimeFilesDownloaderBPLibrary>();
|
||||
FileUrl = URL;
|
||||
FileSavePath = SavePath;
|
||||
|
||||
@@ -45,7 +44,7 @@ URuntimeFilesDownloaderBPLibrary* URuntimeFilesDownloaderBPLibrary::DownloadFile
|
||||
return this;
|
||||
}
|
||||
|
||||
void URuntimeFilesDownloaderBPLibrary::OnReady(FHttpRequestPtr Request, FHttpResponsePtr Response, bool bWasSuccessful)
|
||||
void URuntimeFilesDownloaderBPLibrary::OnReady_Internal(FHttpRequestPtr Request, FHttpResponsePtr Response, bool bWasSuccessful)
|
||||
{
|
||||
RemoveFromRoot();
|
||||
Request->OnProcessRequestComplete().Unbind();
|
||||
|
||||
+2
-2
@@ -72,11 +72,11 @@ public:
|
||||
* @return Returns itself.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category = "RuntimeFilesDownloader")
|
||||
URuntimeFilesDownloaderBPLibrary* DownloadFile(const FString & URL, FString SavePath);
|
||||
URuntimeFilesDownloaderBPLibrary* DownloadFile_Internal(const FString & URL, FString SavePath);
|
||||
|
||||
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);
|
||||
};
|
||||
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user