Skip to content

Commit 4b81045

Browse files
committed
clear up some warnings in visual recognition scripts
1 parent 682c8a0 commit 4b81045

File tree

4 files changed

+30
-5
lines changed

4 files changed

+30
-5
lines changed

Examples/ServiceExamples/Scripts/ExampleVisualRecognition.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ private IEnumerator Examples()
136136

137137
while (!_detectFacesPostTested)
138138
yield return null;
139-
139+
140140
#if DELETE_TRAINED_CLASSIFIER
141141
#region Delay
142142
Runnable.Run(Delay(_delayTime));
@@ -217,20 +217,23 @@ private void OnDetectFacesPost(FacesTopLevelMultiple multipleImages, Dictionary<
217217
_detectFacesPostTested = true;
218218
}
219219

220-
#region Delay
220+
#region Delay
221221
// Introducing a delay because of a known issue with Visual Recognition where newly created classifiers
222222
// will disappear without being deleted if a delete is attempted less than ~10 seconds after creation.
223+
#if DELETE_TRAINED_CLASSIFIER
223224
private float _delayTime = 15f;
224225
private bool _isWaitingForDelay = false;
225226

227+
226228
private IEnumerator Delay(float delayTime)
227229
{
228230
_isWaitingForDelay = true;
229231
Log.Debug("ExampleVisualRecognition.Delay()", "Delaying for {0} seconds....", delayTime);
230232
yield return new WaitForSeconds(delayTime);
231233
_isWaitingForDelay = false;
232234
}
233-
#endregion
235+
#endif
236+
#endregion
234237

235238
private void OnFail(RESTConnector.Error error, Dictionary<string, object> customData)
236239
{

Scripts/Services/Assistant.meta

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Scripts/Services/Assistant/v1.meta

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Scripts/UnitTests/TestVisualRecognition.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,8 @@ private void OnDetectFacesPost(FacesTopLevelMultiple multipleImages, Dictionary<
263263
_detectFacesPostTested = true;
264264
}
265265

266-
#region Delay
266+
#region Delay
267+
#if DELETE_TRAINED_CLASSIFIER
267268
// Introducing a delay because of a known issue with Visual Recognition where newly created classifiers
268269
// will disappear without being deleted if a delete is attempted less than ~10 seconds after creation.
269270
private float _delayTime = 15f;
@@ -276,7 +277,8 @@ private IEnumerator Delay(float delayTime)
276277
yield return new WaitForSeconds(delayTime);
277278
_isWaitingForDelay = false;
278279
}
279-
#endregion
280+
#endif
281+
#endregion
280282

281283
private void OnFail(RESTConnector.Error error, Dictionary<string, object> customData)
282284
{

0 commit comments

Comments
 (0)