CodeSmile AssetDatabase 1.9
Unity's AssetDatabase in enjoyable, consistent, concise, convenient, comprehensible, safe, documented form.
Loading...
Searching...
No Matches

◆ Delete()

Object Delete ( )

Deletes the asset file.

Does NOT destroy the object reference. CAUTION: The asset instance is no longer valid after this call and should be discarded.

Returns
If successful, returns the former MainObject. It is no longer an asset but still a valid instance. Returns null if the object wasn't deleted.
See also

Definition at line 440 of file Asset.cs.

441 {
442 var mainObject = m_MainObject;
443 if (File.Delete(m_AssetPath))
444 InvalidateInstance();
445
446 return mainObject;
447 }

References Asset.File.Delete().

+ Here is the call graph for this function: