From 4ee7155b63120301d732db6d8432e3702d56bfcc Mon Sep 17 00:00:00 2001 From: Soraphis Date: Mon, 25 Apr 2022 09:56:12 +0200 Subject: [PATCH] fix: conditional compilation for EDITOR only code --- Packages/Core/Runtime/StackTrace/StackTraceEntry.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Packages/Core/Runtime/StackTrace/StackTraceEntry.cs b/Packages/Core/Runtime/StackTrace/StackTraceEntry.cs index c358e661..7de8984b 100644 --- a/Packages/Core/Runtime/StackTrace/StackTraceEntry.cs +++ b/Packages/Core/Runtime/StackTrace/StackTraceEntry.cs @@ -60,10 +60,15 @@ namespace UnityAtoms } } +#if UNITY_EDITOR public static StackTraceEntry Create(object obj, int skipFrames = 0) => AtomPreferences.IsDebugModeEnabled ? new StackTraceEntry(new StackTrace(skipFrames), obj) : null; public static StackTraceEntry Create(int skipFrames = 0) => AtomPreferences.IsDebugModeEnabled ? new StackTraceEntry(new StackTrace(skipFrames)) : null; +#else + public static StackTraceEntry Create(object obj, int skipFrames = 0) => null; + public static StackTraceEntry Create(int skipFrames = 0) => null; +#endif public override bool Equals(object obj) => Equals(obj as StackTraceEntry);