Get prefab's path in file system

Hi all. I have game object on my scene, it’s prefab. I want to find it on assets.
I tried to find it, using AssetDatabase.GetAssetPath, but it returns nulls. Here’s the code:

[MenuItem("Custom/Check item")]
    private static void CheckSelection()
        if (Selection.activeGameObject == null) {
            Debug.LogError("No item selected");

        var go = PrefabUtility.FindPrefabRoot(Selection.activeGameObject);
        Debug.Log(AssetDatabase.GetAssetPath(go) + " " + AssetDatabase.Contains(go));

What’s the right way to find prefab in file system?

Ops, i found answer. I needed to use PrefabUtility.GetPrefabParent instead of FindPrefabRoot:

var go = PrefabUtility.GetPrefabParent(Selection.activeGameObject);
Debug.Log(AssetDatabase.GetAssetPath(go) + " " + AssetDatabase.Contains(go));

If you need find object in Prefabs, Material, Scene, by GUID

Click Right-click select “Find GUID in Prefabs Material Scene” the object to find in Prefabs, Material, Scene, by GUID.