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

◆ SaveAsNew()

Asset SaveAsNew ( Path path)

Saves a copy of the asset to a new path. Generates a unique file/folder name if path already exists.

Will automatically create missing folders.

Parameters
pathThe path where to save the copy. Note that actual path of the asset may change.
Returns
The copy of the Asset or null if copying failed. Use CodeSmileEditor.Asset.GetLastErrorMessage to get the human readable error message.
See also

Definition at line 273 of file Asset.cs.

274 {
275 ThrowIf.ArgumentIsNull(path, nameof(path));
276
277 return SaveAs(path.UniqueFilePath);
278 }
Asset SaveAs(Path path)
Saves a copy of the asset to a new path. Overwrites any existing asset at path.

References Asset.SaveAs().

+ Here is the call graph for this function: