Skip to content

Commit 40922b0

Browse files
committed
add updated websocket-sharp plugin, resolve warnings and errors
1 parent f5cca50 commit 40922b0

File tree

5 files changed

+7
-8
lines changed

5 files changed

+7
-8
lines changed

Examples/ServiceExamples/Scripts/ExampleAssistant.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,7 @@ public class ExampleAssistant : MonoBehaviour
4343
private string _createdWorkspaceId;
4444

4545
private Assistant _service;
46-
47-
private fsSerializer _serializer = new fsSerializer();
48-
46+
4947
private string _inputString = "Turn on the winshield wipers";
5048

5149
private static string _createdWorkspaceName = "unity-sdk-example-workspace-delete";

Examples/ServiceExamples/Scripts/ExampleCustomHeaders.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ public class ExampleCustomHeaders : MonoBehaviour
4040
#endregion
4141

4242
private Assistant _service;
43-
private fsSerializer _serializer = new fsSerializer();
4443
private string _inputString = "Turn on the winshield wipers";
4544

4645
void Start()

Plugins/websocket-sharp.dll

1.5 KB
Binary file not shown.

Scripts/Connection/WSConnector.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
using System.Threading;
2626

2727
#if !NETFX_CORE
28-
using WebSocketSharp;
28+
using UnitySDK.WebSocketSharp;
2929
#else
3030
using System;
3131
using System.Threading.Tasks;
@@ -366,9 +366,9 @@ private void OnWSClose(object sender, CloseEventArgs e)
366366
private void OnWSMessage(object sender, MessageEventArgs e)
367367
{
368368
Message msg = null;
369-
if (e.Opcode == Opcode.Text)
369+
if (e.IsText)
370370
msg = new TextMessage(e.Data);
371-
else if (e.Opcode == Opcode.Binary)
371+
else if (e.IsBinary)
372372
msg = new BinaryMessage(e.RawData);
373373

374374
lock (_receiveQueue)

Scripts/UnitTests/TestVisualRecognition.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ public class TestVisualRecognition : UnitTest
5252
#if TRAIN_CLASSIFIER
5353
private bool _trainClassifierTested = false;
5454
private bool _getClassifierTested = false;
55+
private bool _getCoreMLModelTested = false;
5556
#endif
5657
#if DELETE_TRAINED_CLASSIFIER
5758
private bool _deleteClassifierTested = false;
@@ -60,7 +61,6 @@ public class TestVisualRecognition : UnitTest
6061
private bool _classifyPostTested = false;
6162
private bool _detectFacesGetTested = false;
6263
private bool _detectFacesPostTested = false;
63-
private bool _getCoreMLModelTested = false;
6464

6565
public override IEnumerator RunTest()
6666
{
@@ -270,11 +270,13 @@ private void OnDetectFacesPost(DetectedFaces multipleImages, Dictionary<string,
270270
_detectFacesPostTested = true;
271271
}
272272

273+
#if TRAIN_CLASSIFIER
273274
private void OnGetCoreMLModel(byte[] resp, Dictionary<string, object> customData)
274275
{
275276
Test(resp != null);
276277
_getCoreMLModelTested = true;
277278
}
279+
#endif
278280

279281
#region Delay
280282
#if DELETE_TRAINED_CLASSIFIER

0 commit comments

Comments
 (0)