PTCInc / vuforia-engine

Bug and feedback issue tracker for the Vuforia Engine SDK
https://developer.vuforia.com
20 stars 0 forks source link

Vuforia not start when using with arfoundation together. #15

Closed Weimmer closed 1 year ago

Weimmer commented 1 year ago

Summarize the bug: Setup projekt with Vuforia and ARFoundation, use the XR Origin, add a simple image target, it works fine in play model, but after built and install into my iPhone, the Vuforia did not start I use the debug tool and read the console. Without XR Origin, Vuforia works too.

Observed problem The console only shows "vuforai initialized" but no "voforia started" as expected. Can not see the child object of image target.

Expected result once the image target tracked, the child object will show up as it should to be.

Reproducible steps Steps to reproduce the behavior:

  1. add xr origin for ar, add image target
  2. add vufuria behaviour and default initialization error handle component on maincamera
  3. test on play model the object shows once the image traget tracked
  4. bulid and install on my iPhone, nothing happens even the image target is in front of the camera

Affected Vuforia Engine version: v10.14.4

Affected platform:

Affected device:

Additional comments I did lots of debugs, almost sure that is something wrong when Vuforia and ARFoundation work together.

Weimmer commented 1 year ago

I think the reason why it works on play model is that the arfoundation would not start on play model.

IggyDevelop commented 1 year ago

I have the same issue on Android devices.

I can't get Vuforia and ARFoundation 5.0 to work together for Android in Unity. In a basic scene with no code, using only Vuforia, the Image Targets recognition works perfectly. When this same basic scene is under ARFoundation 5.0, in play mode in the editor, the scene works correctly and Vuforia's Image Targets work correctly. However, when I run it on an Android device, Vuforia doesn't recognize the target.

These error messages from Vuforia appear in logcat when I use the ARFoundation 5.0 scene in an Android device:

Error Unity Exception in callback: Object reference not set to an instance of an object. Error Unity Vuforia.Utility.ExtensionMethods.DelegateHelper:InvokeDelegate(Delegate, Object[]) Error Unity Vuforia.Internal.Core.Engine:OnStart() Error Unity Vuforia.Internal.Core.Engine:Start(Action) Error Unity System.Reflection.RuntimeMethodInfo:Invoke(Object, BindingFlags, Binder, Object[], CultureInfo) Error Unity System.Delegate:DynamicInvokeImpl(Object[]) Error Unity Vuforia.Utility.ExtensionMethods.DelegateHelper:InvokeDelegate(Delegate, Object[]) Error Unity Vuforia.Utility.ExtensionMethods.DelegateHelper:InvokeWithExceptionHandling(Action`1, T) Error Unity Vuforia.Internal.Core.Engine:InitOnCameraReady() Error Unity Vuforia.Internal.ARFoundation.d__20:MoveNext() Error Unity UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)

ptc-ddowning commented 1 year ago

Thank you for the reports. I've reverted the observations provided here for an internal review.

ptc-ddowning commented 1 year ago

Hello,

We believe we've identified the source of the issue and will look to release a fix in an upcoming release. In the meantime, here is a workaround:

IggyDevelop commented 1 year ago

Ok! The temporary solution worked for me. I will wait for the new release.

ptc-ddowning commented 1 year ago

The fix for this issue will be part of our upcoming Engine 10.16 release.

Thank you.

ptc-pscheper commented 1 year ago

Please note that this was fixed last week as part of the 10.16 release of Vuforia Engine. Please see our release notes for more information: https://library.vuforia.com/release-notes/vuforia-engine-release-notes#vuforia-engine-v10-16-3

yosun commented 10 months ago

Is there official VisionOS support from vuforia

yosun commented 10 months ago

Tried adding latest vuforia to Unity 2022.3.18f PolySpatial (with ARFoundation) 1.0.3 - could not build

Library/PackageCache/com.ptc.vuforia.engine@e5885903f78d/Vuforia/Scripts/Internal/ARFoundationIntegration/ARFoundationFacade.cs(14,15): error CS0234: The type or namespace name 'ARFoundation' does not exist in the namespace 'Vuforia' (are you missing an assembly reference?)
ptc-pscheper commented 10 months ago

@yosun Please create a separate bug report and supported device request for the questions above. Thank you!

yosun commented 4 months ago

do you incidentally have a sample proj with ARFoundation + Vuforia working in the same project?

ptc-epassaro commented 4 months ago

Hi @yosun, we unfortunately don't have a sample project for ARFoundation + Vuforia. Also, the support for ARFoundation is now deprecated and will be removed in a future release of Vuforia.

In the meantime, if you haven't tried it yet, I would highly recommend you to try using the latest version of Vuforia: 10.25.4. Some changes were made in the latest releases that might help with your issue.

If you try that, please let us know how it goes.

yosun commented 4 months ago

why is ARFoundation deprecated - it's a crucial part to integrating with ARKit/ARCore in (modern versions of) Unity

Older versions of Unity do not build for iOS/Android versions on modern phones.