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

468 {
469 var mainObject = m_MainObject;
470 if (File.Trash(m_AssetPath))
471 InvalidateInstance();
472
473 return mainObject;
474 }

References Asset.File.Trash().

+ Here is the call graph for this function: