Start a new topic

StartContinuousRecognition does not work as expected

Setup


Unity: 2019.3.1f1

Wikitude: Beta 0.4.0


Issue


I just implemented cloud recognition and realised that StartContinuousRecognition did not worked as i expected.

I set interval to 1000 (1 second). But it only tries to recognise once directly after calling this method.


ImageTracker.CloudRecognitionService.StartContinuousRecognition (intervalInMilliseconds);


The scans value in my account will only be increased by one as well (not as expected once a second by one).


image



I can call this method once a second by myself but this kind a feels like a hotfix to me (it works as expected if i do this).


ImageTracker.CloudRecognitionService.Recognize ();


Good to know


I’m creating and configuring the tracker during runtime based on a prefab, setting clientToken and CollectionID on demand.


I attached a video to demonstrate what I’m talking about as well as a code snippet so that you can see how the cloud image tracker is build during runtime.


Code: https://gist.github.com/JanOwiesniak/4b94dfca0e5b5b00e9e331a593a870db

Video: Attached


Hope you can help me to figure out what is wrong here :)


Best Jan


Hi, 


You are indeed correct and I've updated the documentation according to your feedback. I apologize for any inconvenience this has caused.


Best regards.


1 person likes this

I figured it out by myself. The issue was that i expected interval was in milliseconds (as documented in the JS API) but it is actually in seconds (not documented in the Unity API). So my assumption was that both APIs are working with the same unit.


Code change

image


JS API (milliseconds)


image


Unity API (unit not documented)


image


You can close this issue but please update the docs so that other developers won't walk into the same trap as i did.

Hello there,


thanks for updating the Unity API documentation. For your information i was talking about this method: https://www.wikitude.com/external/doc/documentation/latest/Reference/Unity%20API/class_wikitude_1_1_cloud_recognition_service.html#a7432f25b6a791866f5fb0c009aded5c9 (docs does not include any unit yet)


Best Jan

Video Example

mp4
Login or Signup to post a comment