コガネブログ

平日更新を目標に Unity や C#、Visual Studio、ReSharper などのゲーム開発アレコレを書いていきます

【Unity】アセットバンドルがキャッシュに存在するか確認する方法

概要

ProvideHandle             provideHandle = ...;
AssetBundleRequestOptions options       = ...;

var location = provideHandle.Location;
var url      = location.InternalId;
var hash     = Hash128.Parse( options.Hash );
var isExist  = Caching.IsVersionCached( url, hash );

Caching.IsVersionCached を使用する