Unclaimed Package Is this your package? Claim it to unlock full analytics and manage your listing.
Claim This Package

Install via UPM

Add to Unity Package Manager using this URL

https://www.pkglnk.dev/assetcache.git

README Markdown

Copy this to your project's README.md

Style
Preview
pkglnk installs badge
## Installation

Add **Gameframe.AssetCache** to your Unity project via Package Manager:

1. Open **Window > Package Manager**
2. Click **+** > **Add package from git URL**
3. Enter:
```
https://www.pkglnk.dev/assetcache.git
```

[![pkglnk](https://www.pkglnk.dev/badge/assetcache.svg?style=pkglnk)](https://www.pkglnk.dev/pkg/assetcache)

README

Gameframe.AssetCache šŸ‘‹

Library for caching and unloading assets

Quick Package Install

Using UnityPackageManager (for Unity 2019.3 or later)

Open the package manager window (menu: Window > Package Manager)
Select "Add package from git URL...", fill in the pop-up with the following link:
https://github.com/coryleach/UnityAssetCache.git#1.3.0

Using UnityPackageManager (for Unity 2019.1 or later)

Find the manifest.json file in the Packages folder of your project and edit it to look like this:

{
  "dependencies": {
    "com.gameframe.assetcache": "https://github.com/coryleach/UnityAssetCache.git#1.3.0",
    ...
  },
}

Usage

//Create an asset cache (like a WebTextureCache)
var cache = new WebTextureCache();

//Get a cached asset asynchronously
var cachedAsset = await cache.GetAsync(url);

//Use the asset
image.texture = cachedAsset.Asset;

//Dispose the reference so the cache knows you no longer are using it
cachedAsset.Dispose();
cachedAsset = null;

//Clean the cache so all assets with zero references are unloaded
cache.ClearUnusedAssets();

Author

šŸ‘¤ Cory Leach

Show your support

Give a ā­ļø if this project helped you!
Please consider supporting it either by contributing to the Github projects (submitting bug reports or features and/or creating pull requests) or by buying me coffee using any of the links below. Every little bit helps!

ko-fi


This README was generated with ā¤ļø by Gameframe.Packages

Comments

No comments yet. Be the first!