以下の内容はhttps://baba-s.hatenablog.com/entry/2022/01/11/120000より取得しました。


【Unity】Addressables で各グループの BundledAssetGroupSchema の Build Path や Load Path の名前を取得するサンプル

ソースコード

using System.Linq;
using UnityEditor;
using UnityEditor.AddressableAssets;
using UnityEditor.AddressableAssets.Settings.GroupSchemas;
using UnityEngine;

public static class Example
{
    [MenuItem( "Tools/Hoge" )]
    public static void Hoge()
    {
        var settings = AddressableAssetSettingsDefaultObject.Settings;

        var names = settings.groups
                .Select( x => x.GetSchema<BundledAssetGroupSchema>() )
                .Where( x => x != null )
                .Select( x => x.BuildPath.GetName( settings ) )
            ;

        foreach ( var name in names )
        {
            // 以下のような名前を取得できる
            // LocalBuildPath
            // RemoteBuildPath
            Debug.Log( name );
        }
    }
}



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

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