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

◆ CopyAsNew()

static Boolean CopyAsNew ( [NotNull] Path sourcePath,
[NotNull] Path destinationPath )
static

Copies an asset from source to destination path. Generates a unique file name if an asset already exist at destinationPath.

Will create any missing destination folders automatically.

Parameters
sourcePathThe source asset to copy.
destinationPathPath to destination file. Note that the actual file name may differ.
Returns
True if copying succeeded, false if it failed. Use CodeSmileEditor.Asset.GetLastErrorMessage to get the failure message.
See also