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.ImportAsset

static function ImportAsset(path: string, options: ImportAssetOptions = ImportAssetOptions.Default): void;
static void ImportAsset(string path, ImportAssetOptions options = ImportAssetOptions.Default);
static def ImportAsset(path as string, options as ImportAssetOptions = ImportAssetOptions.Default) as void

Description

Import asset at path.

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

See Also: ImportAssetOptions.