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

◆ CanMove()

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

Tests if an asset can be moved to destination without moving the asset.

Note: This returns false if any folders of destinationPath do not exist.

Parameters
sourcePathThe path to an asset file.
destinationPathThe path to move the file to. May have a different extension.
Returns
True if moving the asset will be successful, false if part of the destinationPath does not exist or other reasons. Use CodeSmileEditor.Asset.GetLastErrorMessage to get the failure message.
See also

Definition at line 623 of file Asset.File.cs.

624 {
625 if (sourcePath == null || destinationPath == null)
626 return false;
627
628 return Succeeded(AssetDatabase.ValidateMoveAsset(sourcePath, destinationPath));
629 }