Skip to content

Commit

Permalink
"why are the images not loading anymore?"
Browse files Browse the repository at this point in the history
  • Loading branch information
Auros committed Jun 27, 2024
1 parent 6aa687a commit f7b9a68
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions SmartImage/Assets/SmartImage/Runtime/SmartImageManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,10 @@ public class SmartImageManager : MonoBehaviour

// If the sprite is already in the cache, and it's valid, return it.
if (_sprites.TryGetValue(id, out var smartSprite) && smartSprite.State == MediaState.Valid)
{
_semaphore.Release();
return smartSprite;
}

// Later we want to check if this caller was the one that created the sprite.
bool createdNewSprite = false;
Expand Down Expand Up @@ -128,6 +131,7 @@ public class SmartImageManager : MonoBehaviour
{
_sprites.Remove(id);
_currentlyBuilding.RemoveAll(c => c.Id == id);
_semaphore.Release();

if (e is TaskCanceledException)
return null;
Expand Down
2 changes: 1 addition & 1 deletion SmartImage/Assets/SmartImage/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "dev.auros.smartimage",
"displayName": "SmartImage",
"version": "0.0.3-beta",
"version": "0.0.4-beta",
"unity": "2021.3",
"description": "A smarter way with dealing with images loaded at runtime in Unity.",
"keywords": ["Async", "Image", "Sprite", "Texture"],
Expand Down

0 comments on commit f7b9a68

Please sign in to comment.