I am having trouble with this line in my code:
AssetDatabase.ExportPackage(AssetDatabase.GetAssetPath(items[0]),
"C:\\path\\" + items[0].name + ".unitypackage",
ExportPackageOptions.IncludeDependencies);
Here, **items** is a `List` and each item is guaranteed to be an asset in the database. However, in any case where a non-default shader is listed as the item to export, or the item includes a non-default shader as a dependency (such as a material that uses it), I get this error message:
![Moving file failed error][1]
[1]: /storage/temp/41370-movingfailed.png
If I change the code to this:
AssetDatabase.ExportPackage(AssetDatabase.GetAssetPath(items[0]),
"C:\\path\\" + items[0].name + ".unitypackage",
ExportPackageOptions.Default);
I.e. instead of the IncludeDependencies options I use Default, I still get the error. My unity version is 4.3.4f1 and my Environment is Window 7 (Japanese). The odd thing is, if I do the export manually, through the menu Assets->Export Package, it works fine.