コガネブログ

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

2020-03-17から1日間の記事一覧

【Unity】Addressable Asset System の AssetBundleRequestOptions でハッシュ値や CRC、ビルドサイズを取得できる

概要 public sealed class Example : IAssetBundleResource { public void Setup( ProvideHandle handle ) { var options = handle.Location.Data as AssetBundleRequestOptions; // ハッシュ値 Debug.Log( options.Hash ); // CRC 値 Debug.Log( options.Cr…

【Unity】Addressable Asset System の BundledAssetGroupSchema.AssetBundleProviderType を変更するエディタ拡張

概要 使用例 using UnityEditor; public static class Example { [MenuItem( "Tools/Hoge" )] private static void Hoge() { var group = AddressableUtils.GetOrCreateGroup( "【グループ名】" ); var bundledAssetGroupSchema = group.Schemas .OfType<BundledAssetGroupSchema>() .</bundledassetgroupschema>…

【Unity】Addressable Asset System の BundledAssetGroupSchema.BundleNaming を変更するエディタ拡張

概要 使用例 public static class Example { [MenuItem( "Tools/Hoge" )] private static void Hoge() { var group = AddressableUtils.GetOrCreateGroup( "【グループ名】" ); var bundledAssetGroupSchema = group.Schemas .OfType<BundledAssetGroupSchema>() .FirstOrDefault() ; </bundledassetgroupschema>…

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

概要 ProvideHandle provideHandle = ...; AssetBundleRequestOptions options = ...; var location = provideHandle.Location; var url = location.InternalId; var hash = Hash128.Parse( options.Hash ); var isExist = Caching.IsVersionCached( url, ha…

【Fork】Stage All ボタンの場所

概要 赤枠のアイコンで Stage All(もしくは Unstage All)できる