using UnityEngine;
using System.Collections;
using UnityEditor;
public class AssetPros : AssetPostprocessor
{
static void OnPostprocessAllAssets
(string[] importedAssets, string[] deletedAssets,
string[] movedAssets, string[] movedFromAssetPaths)
{
foreach (var str in importedAssets)
Debug.Log("アセットを再インポート: " + str);
foreach (var str in deletedAssets)
Debug.Log("アセットを削除: " + str);
for (var i = 0; i < movedAssets.Length; i++)
Debug.Log("アセットを移動: " + movedAssets[i] + " 移動元: " + movedFromAssetPaths[i]);
}
}
細かい処理などは後でまた
2014年4月28日月曜日
unityでassetインポート時に処理を行う方法
AssetPostprocessorを継承した食らうでstaticでOnPostprocessAllAssetsを作ればいいっぽい
登録:
コメントの投稿 (Atom)
0 件のコメント:
コメントを投稿