diff --git a/RuntimeFilesDownloader/Source/RuntimeFilesDownloader/Private/RuntimeFilesDownloaderBPLibrary.cpp b/RuntimeFilesDownloader/Source/RuntimeFilesDownloader/Private/RuntimeFilesDownloaderBPLibrary.cpp index 798a86e..3f67e35 100644 --- a/RuntimeFilesDownloader/Source/RuntimeFilesDownloader/Private/RuntimeFilesDownloaderBPLibrary.cpp +++ b/RuntimeFilesDownloader/Source/RuntimeFilesDownloader/Private/RuntimeFilesDownloaderBPLibrary.cpp @@ -27,7 +27,6 @@ URuntimeFilesDownloaderBPLibrary* URuntimeFilesDownloaderBPLibrary::CreateDownlo URuntimeFilesDownloaderBPLibrary* URuntimeFilesDownloaderBPLibrary::DownloadFile(const FString& URL, FString SavePath) { - URuntimeFilesDownloaderBPLibrary* Downloader = NewObject(); 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(); diff --git a/RuntimeFilesDownloader/Source/RuntimeFilesDownloader/Public/RuntimeFilesDownloaderBPLibrary.h b/RuntimeFilesDownloader/Source/RuntimeFilesDownloader/Public/RuntimeFilesDownloaderBPLibrary.h index 993b490..8858db1 100644 --- a/RuntimeFilesDownloader/Source/RuntimeFilesDownloader/Public/RuntimeFilesDownloaderBPLibrary.h +++ b/RuntimeFilesDownloader/Source/RuntimeFilesDownloader/Public/RuntimeFilesDownloaderBPLibrary.h @@ -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); }; diff --git a/RuntimeFilesDownloader4260.zip b/RuntimeFilesDownloader4260.zip new file mode 100644 index 0000000..66495b0 Binary files /dev/null and b/RuntimeFilesDownloader4260.zip differ