Skip to content

Commit 2632202

Browse files
committed
chore: additional missing WebGL build flags
1 parent db40b37 commit 2632202

2 files changed

Lines changed: 13 additions & 4 deletions

File tree

Assets/Scripts/API/APIManager.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,17 @@
33
using System.Collections;
44
using System.Collections.Generic;
55
using System.Linq;
6-
#if !UNITY_WEBGL
7-
using System.Security.Policy;
8-
#endif
96
using TMPro;
107
using UnityEngine;
118
using UnityEngine.Events;
129
using UnityEngine.Networking;
1310
using UnityEngine.UI;
11+
#if UNITY_WEBGL && !UNITY_EDITOR
12+
using System.Runtime.InteropServices;
13+
#endif
14+
#if !UNITY_WEBGL
15+
using System.Security.Policy;
16+
#endif
1417

1518
public class APIManager : MonoBehaviour
1619
{

Assets/Scripts/TrajectoryPlanner/TrajectoryPlannerManager.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
using UnityEngine.UI;
1414
#if UNITY_WEBGL
1515
using System.Collections.Specialized;
16+
using System.Runtime.InteropServices;
1617
#endif
1718

1819
#if UNITY_EDITOR
@@ -23,7 +24,7 @@
2324

2425
using UnityEditor.Build;
2526
using UnityEditor.Build.Reporting;
26-
27+
2728
public class MsvcStdextWorkaround : IPreprocessBuildWithReport
2829
{
2930
const string kWorkaroundFlag = "/D_SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS";
@@ -50,6 +51,11 @@ public void OnPreprocessBuild(BuildReport report)
5051

5152
namespace TrajectoryPlanner
5253
{
54+
#if UNITY_WEBGL && !UNITY_EDITOR
55+
[DllImport("__Internal")]
56+
private static extern void Copy2Clipboard(string str);
57+
#endif
58+
5359
public class TrajectoryPlannerManager : MonoBehaviour
5460
{
5561

0 commit comments

Comments
 (0)