Version: 2019.3

AssetDatabase.GetAssetOrScenePath

Switch to Manual
public static string GetAssetOrScenePath (Object assetObject);

Description

Возвращает имя пути относительно папки проекта, где хранится ассет.

All paths are relative to the project folder, for example: "Assets/MyTextures/hello.png" When a game object is part of a Scene, the Scene path is returned.