TL;DR;
Debug.Log($@"<a href=""{filePath}"" line=""{line}"">link</a>");
ConsoleWindow以外で
UnityEditorInternal.InternalEditorUtility.OpenFileAtLineExternal
で即時開くことができます。
Button等で蹴ってあげればいいでしょう。
また、ConsoleWindowと同じようにAタグによってリンクを張ることもできます。ただし、GUIStyleをCN Message
にしておく必要があります。
static Lazy<GUIStyle> STYLE = new Lazy<GUIStyle>(() => (GUIStyle)"CN Message");
EditorGUILayout.SelectableLabel($@"<a href=""{filePath}"" line=""{line}"">link</a>", STYLE.Value);
Sample project