Legacy Documentation: Version 4.5.0

Script language:

  • JS
  • C#
  • Boo
Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

AssetDatabase.GenerateUniqueAssetPath

static function GenerateUniqueAssetPath(path: string): string;
static string GenerateUniqueAssetPath(string path);
static def GenerateUniqueAssetPath(path as string) as string

Description

Creates a new unique path for an asset.

All paths are relative to the project folder, for example: "Assets/MyTextures/hello.png".