void Delete()

book_4_sparkGenerated
code_blocksInput

Description

The Delete method is used to remove an asset from the editor. When invoked, it sends both the source and compiled files of the asset to the recycle bin, effectively deleting them from the project.

Usage

To delete an asset, simply call the Delete method on an instance of the Editor.Asset class. Ensure that you have confirmed the deletion, as this action cannot be undone through the API.

Example

// Example of using the Delete method
Editor.Asset myAsset = GetAssetSomehow();
myAsset.Delete();

// After calling Delete, the asset's files are moved to the recycle bin.