IAsset
|
string[] RemoveAssetsAndFolders( string[] assetIds, out string[] assetItemsWithRefs, bool permenant = false )
If the Assets/Asset Folders are not under the Asset Recycle Folder, they will be moved to the Recycle Folder. If they are already under the Recycle Folder, they will be permenantly purged.
Call this method rather than calling RemoveAsset(String, Boolean) and RemoveAssetFolder(String, Boolean) seperately. This will query dependencies more efficiently and prevent "dependencies out of deletion range errors" if folders contain items being referenced by assets also getting deleted.
Two events are fired during execution of this method: BeforeAssetDelete and AfterAssetDelete.