Unity-Technologies / arfoundation-samples

Example content for Unity projects based on AR Foundation
Other
2.99k stars 1.11k forks source link

[Bug] ARTrackedImageManager is unable to run with only runtime created ImageLibraries #1026

Closed SimonDarksideJ closed 6 months ago

SimonDarksideJ commented 1 year ago

Unity bug report case number https://unity3d.atlassian.net/servicedesk/customer/portal/2/IN-23213

Describe the bug According to the ARFoundation Image tracking documentation, the ImageReference Library property can be let empty for the ARTrackedImageManager in the editor and the library instead can be created and added to at runtime.

However, if there is no ImageReference Library configured in the editor with at least one image (image reference libraries cannot have no images), they the ARTrackedImageManager does not seem to start and any images added at runtime are not detected.

To Reproduce Steps to reproduce the behavior:

  1. Open the ARFoundation-samples project in Unity and add Logcat
  2. Build and run the BasicImageTrackingScene, click the "Add Images" button and confirm the sample images are detected (images one and two)
  3. Open the BasicImageTrackingScene and clear the SerialisedLibrary setting in the ARTrackedImageManager
  4. Update the DynamicLibrary script to create a library for the manager at line 160, prior to it adding the dynamic images
manager.referenceLibrary = manager.CreateRuntimeLibrary() as MutableRuntimeReferenceImageLibrary;
  1. Run the project on Android and click the "Add images" button, which reports the images were added successfully
  2. Try to scan one of the sample (one or two) tracking images
  3. See no images are detected

Expected behavior The ARTrackedImageManager should be able to operate without a pre-configured ImageReference Library (as described in the documentation), especially if all the Tracking Images are going to be loaded remotely at runtime.

Actual behavior Runtime images added without a boilerplate ImageTracking Library added in the editor do not get detected

Smartphone (please complete the following information):

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

SimonDarksideJ commented 1 year ago

ANy update on this issue, since the bots of staleness are going to close it because no one has responded?

andyb-unity commented 1 year ago

Hi @SimonDarksideJ, apologies for stalebot. I have removed the stale label for this issue. Your bug report linked above was closed by our incoming QA team as you did not respond to their question while trying to reproduce the issue. It would help for you or someone else to file this bug and respond to any questions from our incoming QA team so that they are able to reproduce the issue and assign any bugs to the correct team.

andyb-unity commented 7 months ago

I just found a note in our docs that I believe addresses your issue: https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@6.0/manual/features/image-tracking.html#create-a-manager-at-runtime

andyb-unity commented 6 months ago

Closing this issue as asked and answered. Let us know if you have further questions.