Skip to content

Commit

Permalink
fix(images): the Load More button works only once
Browse files Browse the repository at this point in the history
  • Loading branch information
Morgan-6Freedom committed Feb 14, 2024
1 parent a0e093b commit 1a64302
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions package/Editor/Images/Images.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ private void OnGUI()

private void OnDestroy()
{
ImagesUI.OnClose();
ImagesUI.CloseSelectedTextureSection();
DataCache.instance.ClearAllImageData();
}
Expand Down Expand Up @@ -100,6 +101,7 @@ public static void GetInferencesData(Action callback_OnDataGet = null) //why get
{
FetchTextureFor(imageData);
}
callback_OnDataGet?.Invoke();
});
}

Expand Down
6 changes: 5 additions & 1 deletion package/Editor/Images/ImagesUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -478,10 +478,14 @@ private void RenderLoadingBox(Rect boxRect)

public void CloseSelectedTextureSection()
{
//ClearData();
selectedTexture = null;
}

public void OnClose()
{
isLoading = false;
}

#endregion

}
Expand Down

0 comments on commit 1a64302

Please sign in to comment.