We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hello dear friends when i request to load unavailable image, davinci does not return error and returns Image has been loaded.
here is my code
Davinci.get() .load(imgUrl) .into(into) .setErrorPlaceholder(errorSprite) .setFadeTime(0) // 0 for disable fading .withStartAction(() => { H.log(TAG, "Download has been started."); }) .withDownloadProgressChangedAction((progress) => { H.log(TAG, "Download progress: " + progress); }) .withDownloadedAction(() => { H.log(TAG, "Download has been completed."); }) .withLoadedAction(() => { H.log(TAG, "Image has been loaded."); // //H.log("into.sprit:" + into.sprite ); if(!avatarHistory.ContainsKey(avatarName)){ avatarHistory.Add(avatarName, into.sprite); } }) .withErrorAction((error) => { H.log(TAG, "loadAvatarImage error:" + error); if(gender == 0){ into.sprite = Resources.Load("avatar_boy"); }else{ into.sprite = Resources.Load("avatar_girl"); } }) .withEndAction(() => { H.log(TAG, "Operation has been finished."); }) .start();
The text was updated successfully, but these errors were encountered:
simple resolve: but maybe not good:
i added this codes to private IEnumerator Downloader() method:
string response = System.Text.Encoding.ASCII.GetString(www.bytes); Debug.Log("[Davinci] urlResponse : " + response); if(response.ToLower().Contains("not found")){ error("Not Found"); yield return null; }else{ if (www.error == null) File.WriteAllBytes(filePath + uniqueHash, www.bytes); www.Dispose(); www = null; if (onDownloadedAction != null) onDownloadedAction.Invoke(); loadSpriteToImage(); underProcessDavincies.Remove(uniqueHash); }
Sorry, something went wrong.
No branches or pull requests
hello dear friends
when i request to load unavailable image, davinci does not return error and returns Image has been loaded.
here is my code
Davinci.get()
.load(imgUrl)
.into(into)
.setErrorPlaceholder(errorSprite)
.setFadeTime(0) // 0 for disable fading
.withStartAction(() =>
{
H.log(TAG, "Download has been started.");
})
.withDownloadProgressChangedAction((progress) =>
{
H.log(TAG, "Download progress: " + progress);
})
.withDownloadedAction(() =>
{
H.log(TAG, "Download has been completed.");
})
.withLoadedAction(() =>
{
H.log(TAG, "Image has been loaded.");
// //H.log("into.sprit:" + into.sprite );
if(!avatarHistory.ContainsKey(avatarName)){
avatarHistory.Add(avatarName, into.sprite);
}
})
.withErrorAction((error) =>
{
H.log(TAG, "loadAvatarImage error:" + error);
if(gender == 0){
into.sprite = Resources.Load("avatar_boy");
}else{
into.sprite = Resources.Load("avatar_girl");
}
})
.withEndAction(() =>
{
H.log(TAG, "Operation has been finished.");
})
.start();
The text was updated successfully, but these errors were encountered: