From ab21fbbb36f33ffc71337dcc7d70990dd779a30a Mon Sep 17 00:00:00 2001 From: James Frowen Date: Fri, 22 Nov 2024 17:41:58 +0000 Subject: [PATCH] feat: adding UnscaledTime as log option Adding `Time.unscaledTime` as option for log time prefix --- Assets/Mirage/Runtime/Logging/MirageLogHandler.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Assets/Mirage/Runtime/Logging/MirageLogHandler.cs b/Assets/Mirage/Runtime/Logging/MirageLogHandler.cs index 8c164f10cb..fa13ea2fe9 100644 --- a/Assets/Mirage/Runtime/Logging/MirageLogHandler.cs +++ b/Assets/Mirage/Runtime/Logging/MirageLogHandler.cs @@ -71,6 +71,9 @@ private string AddTimePrefix(string format) timePrefix = "0"; } break; + case TimePrefix.UnscaledTime: + timePrefix = Time.unscaledTime.ToString("0.000"); + break; case TimePrefix.DateTimeMilliSeconds: timePrefix = DateTime.Now.ToString("HH:mm:ss.fff"); break; @@ -86,6 +89,7 @@ public enum TimePrefix { None, FrameCount, + UnscaledTime, DateTimeMilliSeconds, DateTimeSeconds, }