Add the script below to Main Camera in Unity 3D. Drag ARSession and ARTarget to this script. When the ARTarget gameobject is disabled, the camera will adjust its focus every two seconds until it encounters Target.
Important!!! Open ARSesion.cs in EasyAR/Scripts and add this function:
public CameraDevice getCameraDevice()
{
return easyarCamera;
}
Download: