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


【Unity】Project ビューで選択中のフォルダ以下のアセットが依存しているすべてのアセットのパスを取得するエディタ拡張

ソースコード

using System.Linq;
using UnityEditor;
using UnityEngine;

public class Example
{
    [MenuItem( "Tools/Hoge" )]
    private static void Hoge()
    {
        var list = Selection
            .GetFiltered<UnityEngine.Object>( SelectionMode.Assets | SelectionMode.DeepAssets )
            .Select( x => AssetDatabase.GetAssetPath( x ) )
            .SelectMany( x => AssetDatabase.GetDependencies( x ) )
            .Where( x => !x.EndsWith( ".cs" ) )
            .Distinct()
            .OrderBy( x => x )
            .ToArray()
            ;

        var result = string.Join( "\n", list );

        EditorGUIUtility.systemCopyBuffer = result;
        Debug.Log( result );
    }
}



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

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