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

◆ UniquifyFileName()

static Path UniquifyFileName ( [NotNull] Path path)
static

Returns the path altered with a numbering if an asset already exists (and is imported) at the path.

See also: Project Settings => Editor => Numbering Scheme

PS: "Uniquify" is a proper english verb. It means "to make unique". Methods carrying this verb are commonly found in SQL database APIs.

Parameters
pathThe input path.
Returns
The path possibly altered with a number in the last path element.
See also

Definition at line 314 of file Asset.Path.Static.cs.

315 {
316 var uniquePath = AssetDatabase.GenerateUniqueAssetPath(path);
317 return String.IsNullOrEmpty(uniquePath) ? path : uniquePath;
318 }