以下の内容はhttps://hacchi-man.hatenablog.com/entry/2020/04/19/220000より取得しました。


【Unity】アセットのディレクトリを移動する

アセットを移動する際にドラッグして移動するのが面倒だったので、移動先を指定して移動できるように拡張

f:id:hacchi_man:20200411235131p:plain:w300

using UnityEditor;
using UnityEngine;
 
public static class EditorMoveDirectory
{
    [MenuItem("Assets/Move Directory")]
    private static void MoveAssets()
    {
        var guids = Selection.assetGUIDs;
        if (guids.Length <= 0)
            return;
 
        var path = EditorUtility.OpenFolderPanel("Select Move Directory", "Assets", "");
        if (string.IsNullOrEmpty(path))
            return;
 
        var inProjectPath = path.Replace(Application.dataPath, "Assets");
        foreach (var guid in guids)
        {
            var assetPath = AssetDatabase.GUIDToAssetPath(guid);
            var fileName = System.IO.Path.GetFileName(assetPath);
            AssetDatabase.MoveAsset(assetPath, System.IO.Path.Combine(inProjectPath, fileName));
        }
    }
}



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

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