[MenuItem("Avatar/Generate AllData",false,0)]
private static void GenerateAllData()
{
UnityEngine.Object[] res = Selection.GetFiltered<UnityEngine.Object>(SelectionMode.DeepAssets);
UnityEngine.Object obj = res.Where(o=>o is DefaultAsset).FirstOrDefault();
string path = (AssetDatabase.GetAssetPath(obj??res.FirstOrDefault()));
string newPath = Temp_PATH path.Substring(path.LastIndexOf("/") 1) "\";
if (!Directory.Exists(newPath)) Directory.CreateDirectory(newPath);
foreach (UnityEngine.Object it in res)
{
if(it is DefaultAsset) continue;
UnityEngine.Object[] o = AssetDatabase.LoadAllAssetsAtPath(AssetDatabase.GetAssetPath(it));
foreach (UnityEngine.Object i in o)
{
if (i.name.Contains("__preview__")) continue;
else if (i is AnimationClip)
AssetDatabase.CreateAsset(Instantiate(i), newPath i.name ".anim");
else if(i is Ma