Skip to content

Commit 561aa3b

Browse files
authored
Editor guard - do not use native code in editor (#195)
1 parent b67bbbb commit 561aa3b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Runtime/Model/Attributes/MachineAttributeProvider.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ private void IncludeOsInformation(IDictionary<string, string> attributes)
5151

5252
//The hostname of the crashing system.
5353
attributes["hostname"] = Environment.MachineName;
54-
#if UNITY_ANDROID
54+
#if UNITY_ANDROID && !UNITY_EDITOR
5555

5656
using (var build = new AndroidJavaClass("android.os.Build"))
5757
{
@@ -75,7 +75,7 @@ private void IncludeOsInformation(IDictionary<string, string> attributes)
7575
#endif
7676

7777

78-
#if UNITY_IOS
78+
#if UNITY_IOS && !UNITY_EDITOR
7979
attributes["uname.version"] = UnityEngine.iOS.Device.systemVersion;
8080
attributes["uname.fullname"] = Environment.OSVersion.Version.ToString();
8181
#endif

0 commit comments

Comments
 (0)