Home c# how to make ar on unity 2019 +

how to make ar on unity 2019 +

Author

Date

Category

Need to do Ar Whatever people could browse it from home, ImageTarget does not fit, in new releases of Wow-cut, user defaind Target, in old on Unity 2019-2020 For some reason, the FPS sends and strange glitches with a camera sometimes, on unity 2019-2020 8th Wall also does not work, either the black screen or works but the outstage is bad (it’s even about the example of the scene speech), how to be? Arcore does not support not so many devices, Arkit for iOS, but I want something cross-software.


Answer 1

I use Unity 2019.4.16F1 and a stable version of VUFORIA 8.1.12 (for January 2021), and everything works correctly, if you follow such a sequence of actions:

  1. Create a new project in Unity.

  2. via Windows – & gt; Package MaNager Install VUFORIA ENGINE AR (stable version 8.1.12)

  3. Create a license key for your project (on the official website ).

  4. In the Hierarchy window, remove the Main Camera object, add VUFORIA ENGINE – & GT; AR CAMERA.

  5. In the AR Cameras settings in VUFORIA Configuration, enter the created license key.

  6. Create VUFORIA ENGINE – & GT; Cloud Image – & gt; Cloud Recognition and VUFORIA ENGINE – & GT; Cloud Image – & gt; Image target.

  7. Create a cloud database database According to the instructions .

  8. In Cloud Recognition Insert the keys of the created database.

  9. Create and add to Cloud Recognition Script SimpleCloudHandler with code:

using unityengine.ui;
using unityengine;
using vuforia;
Using System.Collections;
Public Class SimpleCloudHandler: Monobehaviour, IOBJECTRECOEVENTHandler {
  Private CloudRecobehaviom McLoudrecobehaviour;
  Void Start ()
  {
  mcloudrecobehaviour = getcomponent ();
  if (mcloudrecobehaviour)
  {
    mcloudrecobehaviour.registereventhandler (this);
  }
  mcloudrecobehaviour.cloudRecoEnabled = True;
  }
  Public Void Oninitialized (TargetFinder TargetFinder)
  {
    Debug.log ("Initialized Cloud Reco");
  }
  Public Void Oniniterror (targetfinder.initstate initerror)
  {
    Debug.log ("CLOUD RECO initialization error" + initerror.tostring ());
  }
  Public Void OnupdateError (targetfinder.updatestate updateerror)
  {
    Debug.log ("Cloud Reco Update Error + UpdateErr.Tostring ());
  }
  Public Void OnStateChanged (Bool Scanning)
  {
    If (Scanning)
    {
      ObjectTracker Tracker = TrackerManager.Instance.getTracker ();
      Tracker.getTargetFinder (). CleArtrackables (False);
    }
  }
  Public Void OnnewSearchResult (targetfinder.targetSearchResult TargetSearchResult)
  {
  Targetfinder.cloudRecosearchResult CloudRecosearchResult = (targetfinder.cloudRecosearchResult) targetsearchresult;
  String NameoftArget = CloudRecosearchResult.TargetName;
  String MetadataoftArget = CloudRecosearchResult.metadata;
  // Use this data as you need, for example, create an UI Text element and output the name of the recognized object
  }
} 

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions