Skip to content

Commit f4b7c9b

Browse files
committed
Cleanup warnings
1 parent f796151 commit f4b7c9b

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

Assets/Plugins/WebGL/WebTools/EventListeners/WebEventListeners.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
using System;
1212
using System.Collections.Generic;
13+
using System.Diagnostics;
1314
using System.Runtime.InteropServices;
1415
using UnityEngine;
1516

@@ -36,6 +37,7 @@ private static void OnBeforeSceneLoadRuntimeMethod()
3637
}
3738
#endif
3839

40+
[Conditional("UNITY_WEBGL")]
3941
public static void AddEventListener(string eventName, Action callback)
4042
{
4143
instance.AddEventListenerInternal(eventName, callback);
@@ -59,7 +61,7 @@ private void AddEventListenerInternal(string eventName, Action callback)
5961
// Add event listener on javascript side
6062
_AddJsEventListener(eventName);
6163
#elif UNITY_EDITOR && WEBTOOLS_LOG_CALLS
62-
Debug.Log($"<color=#00CCCC>{nameof(WebEventListeners)}.{nameof(AddEventListenerInternal)} add callback for {eventName}</color>");
64+
UnityEngine.Debug.Log($"<color=#00CCCC>{nameof(WebEventListeners)}.{nameof(AddEventListenerInternal)} add callback for {eventName}</color>");
6365
#endif
6466
}
6567
}

Assets/Scripts/Editor/BuildScript.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,11 @@ public static void Build(string[] args)
106106
break;
107107
}
108108
case BuildTarget.StandaloneOSX:
109+
#if UNITY_2021_3_OR_NEWER
110+
PlayerSettings.SetScriptingBackend(NamedBuildTarget.Standalone, ScriptingImplementation.Mono2x);
111+
#else
109112
PlayerSettings.SetScriptingBackend(BuildTargetGroup.Standalone, ScriptingImplementation.Mono2x);
113+
#endif
110114
break;
111115
case BuildTarget.WebGL:
112116
#if UNITY_2021_2_OR_NEWER

0 commit comments

Comments
 (0)