When export APK without split binary, work perfectly.
When choose "split binary" ( apk and obb files ), auto focus doesn't work!!
I'm using Unity 4.5.0 and Vuforia 3.0.9.
I add this line to Assets/Plugins/Android/AndroidManifest.xml to strengthen the existing autofocus:
<uses-feature android:name="android.hardware.camera.autofocus" />
But, nothing happen when split...
Here the code added to ARCamera to debug and try to force autofocus:
if(CameraDevice.Instance.SetFocusMode(CameraDevice.FocusMode.FOCUS_MODE_CONTINUOUSAUTO))
{
Debug.Log("Unity: FOCUS_MODE_CONTINUOUSAUTO"); // When NOT split, works fine
mFocusMode = CameraDevice.FocusMode.FOCUS_MODE_CONTINUOUSAUTO;
mContinousAFSupported = true;
}else{
Debug.LogError("Unity: could not switch to continuous autofocus"); // When split, ERROR!
mContinousAFSupported = false;
mFocusMode = CameraDevice.FocusMode.FOCUS_MODE_NORMAL;
}
Anybody has this problem ?
Thanks
The real problem is not autofocus, the problem is Vuforia and OBB file expansion.
The solution i receive on Unity forum, by a friend that have the same problem and help me.
So i will left all links here to help everybody that will be problems like me on Vuforia 3.x, OK and Unity 4.x. The new versions of, i dont test yet.
Heres the link.
My friend help: http://forum.unity3d.com/threads/why-when-split-binary-auto-focus-doesnt-work-anymore.309233/
Vuforia doc for OBB: https://developer.vuforia.com/forum/faq/unity-how-can-i-handle-large-android-apps
How to handle it: https://developer.vuforia.com/forum/unity-3-extension-technical-discussion/dataset-does-not-exist-error-when-using-unity-4-android
This last one HELP ME A LOT!