Skip to content

Commit

Permalink
fix: Unity agent errors when running on UnityEditor with the iOS plat…
Browse files Browse the repository at this point in the history
…form.
  • Loading branch information
ndesai-newrelic committed Oct 21, 2024
1 parent a5dec33 commit cabe2ae
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions com.newrelic.agent/Scripts/NewRelicAgent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System.Threading;
using UnityEngine.SceneManagement;
using System.Collections;
#if UNITY_IPHONE || UNITY_ANDROID
#if UNITY_IOS || UNITY_ANDROID
using NewRelic.Native;
#endif
using NewRelic.Networking;
Expand Down Expand Up @@ -340,7 +340,7 @@ public void NewRelicLogCallback(string condition, string stackTrace, LogType typ

#endif

#if (UNITY_IOS)
#if (UNITY_IOS && !UNITY_EDITOR)
NewRelicIos.logMessageHandler(condition, stackTrace, type);
#endif

Expand All @@ -365,7 +365,7 @@ void OnEnable()
UnityEngine.Debug.Log ("UnhandledExceptionEventHandler installed");
#endif // UNITY_ANDROID

#if (UNITY_IOS)
#if (UNITY_IOS && !UNITY_EDITOR)
Application.logMessageReceived += NewRelicIos.logMessageHandler;
#endif
}
Expand All @@ -383,7 +383,7 @@ void OnDisable()
UnityEngine.Debug.Log ("UnhandledExceptionEventHandler removed");
#endif // UNITY_ANDROID

#if (UNITY_IOS)
#if (UNITY_IOS && !UNITY_EDITOR)
Application.logMessageReceived -= NewRelicIos.logMessageHandler;
#endif
}
Expand Down

0 comments on commit cabe2ae

Please sign in to comment.