以下の内容はhttps://baba-s.hatenablog.com/entry/2020/11/16/080000_5より取得しました。


【Unity】Addressable Asset System ですべての Missing Reference なグループを削除するエディタ拡張

概要

using System.Reflection;
using UnityEditor;
using UnityEditor.AddressableAssets;
using UnityEditor.AddressableAssets.Settings;

public static class Example
{
    [MenuItem( "Tools/Hoge" )]
    private static void Hoge()
    {
        var settings   = AddressableAssetSettingsDefaultObject.Settings;
        var type       = typeof( AddressableAssetSettings );
        var methodInfo = type.GetMethod( "RemoveMissingGroupReferences", BindingFlags.Instance | BindingFlags.NonPublic );

        methodInfo.Invoke( settings, new object[0] );
    }
}

f:id:baba_s:20201110120947p:plain

  • Addressables Groups ウィンドウで右クリックして「Clear missing references.」を選択した時に呼び出される関数を呼び出すエディタ拡張です
  • エディタ拡張実行後は Addressables Groups ウィンドウの表示は更新されません
    • 再度 Addressables Groups ウィンドウを開くを Missing Reference なグループが消えていることが確認できます



以上の内容はhttps://baba-s.hatenablog.com/entry/2020/11/16/080000_5より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14