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

◆ Trash()

Object Trash ( )

Moves the asset to the OS trash. Same as Delete, but recoverable.

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 463 of file Asset.cs.

464 {
465 var mainObject = m_MainObject;
466 if (File.Trash(m_AssetPath))
467 InvalidateInstance();
468
469 return mainObject;
470 }

References Asset.File.Trash().

+ Here is the call graph for this function: