Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Vuforia 8.0 & Unity 2018.3.6f1 Cloud Reco

Discussion in 'Vuforia' started by GeneralDollar, Mar 1, 2019.

  1. GeneralDollar

    GeneralDollar

    Joined:
    Mar 24, 2018
    Posts:
    27
    I can't seem to find any updated documentation on how to implement Cloud Reco with this new Vuforia version. The old method when I created a simplecloudhandler script would utilize ICloudRecoEventHandler, however, this is now deprecated. We are told to use IObjectRecoEventHandler instead, however, it's not as simple as that with the lack of information on the additional changes required.

    Also, how do you make a simple cube that is childed to the cloud reco image appear on the target.

    I am able to retrieve cloud meta data. I had to convert targetSearchResult into a cloudSearchResult inside of the OnNewSearchResult() which was a headache to figure out. I get all the way to the point before the cube appearing on the screen.

    Code (CSharp):
    1. // Build augmentation based on target
    2.         if (m_ImageTargetBehaviour)
    3.         {
    4.  
    5.             // enable the new result with the same ImageTargetBehaviour:
    6.             ObjectTracker tracker = TrackerManager.Instance.GetTracker<ObjectTracker>();
    7.             ImageTargetBehaviour imageTargetBehaviour =
    8.              (ImageTargetBehaviour)tracker.GetTargetFinder<TargetFinder>().EnableTracking(
    9.              cloudResult, m_ImageTargetBehaviour.gameObject);
    10.  
    11.             // What works?
    12.             m_TargetFinder.EnableTracking(cloudResult, m_ImageTargetBehaviour.gameObject);
    13.  
    14.  
    15.         }
    With the old Unity and Vuforia, this would have been finished already with:

    Code (CSharp):
    1. m_TargetFinder.EnableTracking(targetSearchResult, m_ImageTargetBehaviour.gameObject);
     
  2. meedabit

    meedabit

    Official Vuforia Employee Vuforia

    Joined:
    Dec 8, 2016
    Posts:
    266
    Hello,

    Check the updated Core samples on the Asset Store, referring to this file: Assets/Common/Scripts/CloudRecoEventHandler.cs

    Thanks,
    Vuforia Engine Support