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.