Skip to content

Commit a021a73

Browse files
committed
chore: minor bugs for WebGL build
1 parent 34ff992 commit a021a73

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

Assets/Scripts/API/APISpikeGLX.cs

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
// this entire class does not exist on WebGL
2-
3-
using System;
4-
using System.Collections;
52
using System.Collections.Generic;
63
using System.Diagnostics;
74
using System.IO;
8-
using System.Security.Policy;
95
using System.Threading.Tasks;
106
using TMPro;
117
using UnityEngine;
128
using Debug = UnityEngine.Debug;
139

10+
#if !UNITY_WEBGL
11+
using System.Security.Policy;
12+
#endif
1413

1514
public class APISpikeGLX : MonoBehaviour
1615
{
@@ -25,7 +24,7 @@ void Start()
2524
Debug.Log(Application.dataPath);
2625
}
2726

28-
#region Unity
27+
#region Unity
2928
private void OnEnable()
3029
{
3130
GetProbeData();
@@ -37,9 +36,9 @@ private void OnDisable()
3736
{
3837

3938
}
40-
#endregion
39+
#endregion
4140

42-
#region Public
41+
#region Public
4342

4443

4544
public async void GetProbeData()
@@ -99,9 +98,9 @@ public void SendData()
9998
SendProbeData(probeManager);
10099
}
101100
}
102-
#endregion
101+
#endregion
103102

104-
#region Private
103+
#region Private
105104

106105
private void SendProbeData(ProbeManager probeManager)
107106
{
@@ -153,5 +152,5 @@ private async Task<string> SendAPIMessage(string msg)
153152

154153
return response;
155154
}
156-
#endregion
155+
#endregion
157156
}

Assets/Scripts/TrajectoryPlanner/TrajectoryPlannerManager.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -878,10 +878,10 @@ private bool LoadSavedProbesWebGL()
878878
}
879879
if (query.Equals("Settings"))
880880
{
881-
string settingsStr = qscoll[query];
882-
Debug.Log(settingsStr);
881+
string settingsQuery = qscoll[query];
882+
Debug.Log(settingsQuery);
883883

884-
var bytes = System.Convert.FromBase64String(encodedStr);
884+
var bytes = System.Convert.FromBase64String(settingsQuery);
885885
string settingsStr = System.Text.Encoding.UTF8.GetString(bytes);
886886

887887
Settings.RecoverFromSaveString(settingsStr);

0 commit comments

Comments
 (0)