Skip to content

Repository files navigation

GameFrameX Logo

GameFrameX Image Cache

Version License Documentation

All-in-One Solution for Indie Game Development · Empowering Indie Developers' Dreams

Documentation · Quick Start · QQ Group · Language: **English** · 简体中文 · 繁體中文 · 日本語 · 한국어


Project Overview

GameFrameX.ImageCache is the image caching component for the GameFrameX framework. It provides remote image downloading and disk caching for Unity projects. Images are cached on disk using MD5-based filenames, with configurable cache path and extensible support for max disk size and expiry.

Platform Support:

  • Non-WebGL: Downloads images via IDownloadManager to disk cache, loads as Texture2D
  • WebGL: Loads images via UnityWebRequestTexture, browser handles caching

Quick Start

Installation

Edit your Unity project's Packages/manifest.json and add the scopedRegistries section:

{
  "scopedRegistries": [
    {
      "name": "GameFrameX",
      "url": "https://gameframex.upm.alianblank.uk",
      "scopes": [
        "com.gameframex"
      ]
    }
  ]
}

Then add the package to dependencies:

{
  "dependencies": {
    "com.gameframex.unity.imagecache": "0.0.1"
  }
}

scopes controls which packages are resolved through this registry. Only packages whose names start with com.gameframex will be fetched from it.

Usage

// Get the ImageCache component
var imageCache = GameEntry.GetComponent<ImageCacheComponent>();

// Load a remote image asynchronously
Texture2D texture = await imageCache.LoadImageAsync("https://example.com/image.png");

// Check if an image is cached
bool cached = imageCache.IsCached("https://example.com/image.png");

// Remove a specific cached image
imageCache.RemoveCache("https://example.com/image.png");

// Clear all cached images
imageCache.ClearCache();

Platform Support

Platform Strategy
iOS / Android / Windows / macOS Disk cache via IDownloadManager
WebGL Browser cache via UnityWebRequestTexture

Documentation & Resources

Community & Support

Changelog

See Releases for changelog.

License

See LICENSE.md for license information.

About

GameFrameX Image Cache — Unity remote image download and disk cache package. Downloads images from HTTP/HTTPS URLs, caches them on disk with MD5-based filenames, and loads them as Texture2D. P... | GameFrameX Image Cache — Unity 远程图片下载与磁盘缓存功能包。从 HTTP/HTTPS URL 下载图片,使用基于 MD5 的文件名缓存到磁盘,并加载为 Texture2D。提供可配置的缓存路径,支持扩展最大磁盘容量和过期时间。独立游…

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages