Legacy Documentation: Version 5.2
LanguageEnglish
  • C#
  • JS

Script language

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

AssetDatabase.AssetPathToGUID

Switch to Manual
public static string AssetPathToGUID(string path);

Parameters

path Filesystem path for the asset.

Description

Get the GUID for the asset at path.

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