跳转代码

  1. string hrefContent = "<a href=\"{0}\" line=\"{1}\">{0}:{1}</a>";
  2. Debug.LogFormat(hrefContent, "Assets/Script/TestScript.cs", 7);

跳转UnityEngine.Object

  1. string hrefContent = "<a href=\"{0}\">{0}</a>";
  2. string objectAssetPath = "Assets/Test.prefab";
  3. Debug.Log(string.Format(hrefContent, objectAssetPath), AssetDatabase.LoadAssetAtPath<UnityEngine.Object>(objectAssetPath));

参考