Search Unity

Issue updating Cloud Reco Proj from 7.2.24 to 7.5.20

Discussion in 'Vuforia' started by rob_ice, Oct 3, 2018.

  1. rob_ice

    rob_ice

    Joined:
    Nov 11, 2016
    Posts:
    112
    Description with steps to reproduce: We updated the Vuforia plugin in our Unity project (using unity 2018.2.10f1) which was already using plugin version 7.2.24 for a Cloud Reco Vuforia App build, it has a SimpleCloudHandler script put together using the cloud reco setup guide in your Vuforia docs. On import of the new plugin, the following error occurs:

    Assets/Scripts/CloudRecoEventHandler.cs(9,14): error CS0535: `CloudRecoEventHandler' does not implement interface member `Vuforia.ICloudRecoEventHandler.OnInitialized(Vuforia.TargetFinder)'

    We have not yet found a way to fix this, as the original project with 7.2.24 works perfectly fine. What's up with this!

    After messing around, I rewrote the code from scratch, then received errors that the methods for getting the target finder were now obsolete and needed to be replaced by '.getTargetFinder' which isn't explained anywhere here for Unity C#, only for native C++ https://library.vuforia.com/articles/Solution/How-To-Implement-Cloud-Reco.html -

    Development OS (Mac OS X, Windows, Linux): Windows 10/Mac OS -

    Mobile OS and Version: IOS 11 and Android 26 (8) -

    Mobile Device Manufacturer and Model name: Unity Editor -

    Do the Vuforia Sample Applications show the same behavior?: No, tested on the Books Vuforia Cloud example - has the API been updated?
     
  2. rob_ice

    rob_ice

    Joined:
    Nov 11, 2016
    Posts:
    112
    After digging around some more, I found that in ICloudRecoEventHandler, the 'OnInitialized();' method has been updated to 'Oninitialized(TargetFinder targetFinder);' which is causing the issues here
     
    meedabit likes this.
  3. meedabit

    meedabit

    Official Vuforia Employee Vuforia

    Joined:
    Dec 8, 2016
    Posts:
    266
    Hello @rob_ice

    Thank you for the investigation, and apologies for the inconvenience. I'll look into the documentation issues and why the API changed without notice to developers.

    Thanks,
    Vuforia Support
     
    rob_ice likes this.
  4. rob_ice

    rob_ice

    Joined:
    Nov 11, 2016
    Posts:
    112
    Hi Meedabit,

    I am happy to provide an example of this scenario also in the form of a Unity project if you need it for proof, I look forward to hearing back from you

    Thanks,
    Rob
     
  5. meedabit

    meedabit

    Official Vuforia Employee Vuforia

    Joined:
    Dec 8, 2016
    Posts:
    266
    Thanks @rob_ice. No example needed. Confirmed yesterday that this was an intended API change and it slipped through the cracks for informing the community.

    The 7.5 samples correctly uses the new API, so the issue here was specifically related to documentation.

    Appreciate the patience. We'll review our internal processes to avoid the oversight in the future.

    Thanks,
    Vuforia
     
    rob_ice likes this.
  6. rob_ice

    rob_ice

    Joined:
    Nov 11, 2016
    Posts:
    112
    Will the documentation be updated in due time, or at least an upgrading guide since the API has changed? I would like to make use of the new improved smaller marker tracking features on an app
     
  7. meedabit

    meedabit

    Official Vuforia Employee Vuforia

    Joined:
    Dec 8, 2016
    Posts:
    266
    Hello,

    The documentation update will have to be prioritized with other tasks. I've filed the ticket but don't see this a high priority update, despite the obvious inconvenience to developers - yourself included.

    The 7.5 improvement for marker detection is one that comes "under the hood". Our recommendation to take advantage of this feature is to set the CameraDeviceMode to MODE_OPTIMIZE_QUALITY, which uses the highest possible Vuforia camera capture resolution for that device. Note that these resolutions vary from device to device, depending upon capabilities.

    Thanks,
    Vuforia Engine Support
     
    rob_ice likes this.
  8. LuxVideoProd

    LuxVideoProd

    Joined:
    Nov 28, 2017
    Posts:
    4
    Hello meedabit... I'm using unity 2018.2.15f1, Updated vuforia to 7.5.26 downloaded the latest Samples from the unity assets store and I was getting the same error...

    Thumbs up to rob_ice who hinted me on the cause of the error, though i was still getting other errors..

    Ok, so after some reading, a couple of brain cells that poped, I found a cure :)

    here's what i did...

    in the CloudRecoEventHandler.cs script file..

    in void Update()

    change : SetCloudActivityIconVisible(m_ObjectTracker.TargetFinder.IsRequesting());

    to : SetCloudActivityIconVisible(m_ObjectTracker.GetTargetFinder<TargetFinder>().IsRequesting());



    change the public void OnInitialized()

    to : public void OnInitialized(TargetFinder targetFinder)

    and change this line : m_TargetFinder = m_ObjectTracker.TargetFinder;

    to m_TargetFinder = m_ObjectTracker.GetTargetFinder<TargetFinder>();



    THEN

    in the CloudErrorHandler.cs file...

    change public void OnInitialized() to public void OnInitialized(TargetFinder targetFinder)



    VOILA!!! that got rid of all the error messages

    I was able to build it in xcode sucessfully, BUT i could not test it on my iPhone 8 plus since i updated it to version 12 not long ago :(
     
    rob_ice and meedabit like this.
  9. kalaiselvan0962

    kalaiselvan0962

    Joined:
    Sep 15, 2019
    Posts:
    1
    I had a below script in my cloud recognition but it's showing error.

    SimpleCloudHandler' does not implement interface member 'IObjectRecoEventHandler.OnInitialized(TargetFinder)'
     

    Attached Files: