public static void LogOrgVer(string msg, int showCallerLevel = 0) { #if UNITY_EDITOR FrameLog.ShowCaller(showCallerLevel); StackFrame frame = new StackFrame(1, true); string fileName = frame.GetFileName(); fileName = fileName.Substring(fileName.LastIndexOf('\\') + 1); fileName = fileName.Replace(".cs", ""); UnityEngine.Debug.Log("F " + UnityEngine.Time.frameCount.ToString() + " [" + fileName + "# " + frame.GetMethod().Name + ": " + frame.GetFileLineNumber() + "] " + msg); #else UnityEngine.Debug.Log("F " + UnityEngine.Time.frameCount.ToString() + "[#] " + msg); #endif }
public static void Log(string msg, int showCallerLevel = 0, [CallerFilePath] string callerFilePath = "", [CallerMemberName] string callerMemberName = "", [CallerLineNumber] int callerLineNum = 0) { #if UNITY_EDITOR FrameLog.ShowCaller(showCallerLevel); string fileName = callerFilePath; fileName = fileName.Substring(fileName.LastIndexOf('\\') + 1); fileName = fileName.Replace(".cs", ""); UnityEngine.Debug.Log("F " + UnityEngine.Time.frameCount.ToString() + " [" + fileName + "# " + callerMemberName + ": " + callerLineNum.ToString() + "] " + msg); #else UnityEngine.Debug.Log("F " + UnityEngine.Time.frameCount.ToString() + "[#] " + msg); #endif }