CodeSmile AssetDatabase 1.10
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 444 of file Asset.cs.

445 {
446 var mainObject = m_MainObject;
447 if (File.Delete(m_AssetPath))
448 InvalidateInstance();
449
450 return mainObject;
451 }

References Asset.File.Delete().

+ Here is the call graph for this function: