` public void Error(string msg)
{
#if UNITY_EDITOR
msg = Msg2LinkStackMsg(msg);
#endif
UnityEngine.Debug.LogError(msg);
}
private static string Msg2LinkStackMsg(string msg)
{
msg = Regex.Replace(msg,@"at (.*?) in (.*?\.cs):(\w+)", match =>
{
string path = match.Groups[2].Value;
string line = match.Groups[3].Value;
return $"{match.Groups[1].Value}\n<a href=\"{path}\" line=\"{line}\">{path}:{line}</a>";
});
return msg;
}` 这个加到UnityLogger中,