以下の内容はhttps://baba-s.hatenablog.com/entry/2020/03/19/010000より取得しました。


【Unity】Addressable Asset System の BundledAssetGroupSchema の Build Path と Load Path を変更するエディタ拡張

概要

使用例

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

public static class Example
{
    [MenuItem( "Tools/Hoge" )]
    public static void Hoge()
    {
        var list = AssetDatabase
                .FindAssets( "t:BundledAssetGroupSchema" )
                .Select( c => AssetDatabase.GUIDToAssetPath( c ) )
                .Select( c => AssetDatabase.LoadAssetAtPath<BundledAssetGroupSchema>( c ) )
            ;

        var settings = AddressableUtils.GetSettings();

        foreach ( var n in list )
        {
            UpdatePath( settings, n );
        }
    }

    private static void UpdatePath
    (
        AddressableAssetSettings settings,
        BundledAssetGroupSchema  schema
    )
    {
        schema.BuildPath.SetVariableByName( settings, "BuildTarget" );
        schema.LoadPath.SetVariableByName( settings, "BuildTarget" );
        //schema.BuildPath.SetVariableByName( settings, AddressableAssetSettings.kLocalBuildPath );
        //schema.LoadPath.SetVariableByName( settings, AddressableAssetSettings.kLocalLoadPath );
        //schema.BuildPath.SetVariableByName( settings, AddressableAssetSettings.kRemoteBuildPath );
        //schema.LoadPath.SetVariableByName( settings, AddressableAssetSettings.kRemoteLoadPath );
    }
}



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

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