AssetDatabase.AssetPathToGUID
static function AssetPathToGUID(path: string): string;
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: "AssetsMyTextureshello.png".