Closed oliverellmers closed 2 years ago
You're following the right steps to create a new XRReferenceObjectLibrary
at runtime and add XRReferenceObject
s to it.
Are you storing ARKit's .arobject
or XRReferenceObject
in the AssetBundle? If it's .arobject
then you will need to follow the steps listed here: https://github.com/Unity-Technologies/arfoundation-samples/issues/890#issuecomment-947395116
Thank you! Will give this a go tomorrow and let you know how I get on.
Best,
Oliver
Oliver Ellmers Design Technologist
T: +44 (0) 7 481 006 477 E: @. | @. | @.*** W: P http://www.oliverellmers.com/ortfolio http://www.oliverellmers.co | Pretty Lucky http://www.prettylucky.co/ | Good Measure https://www.goodmeasure.xyz/
On Wed, Feb 9, 2022 at 1:20 AM ankur-unity @.***> wrote:
You're following the right steps to create a new XRReferenceObjectLibrary at runtime and add XRReferenceObjects to it.
Are you storing ARKit's .arobject or XRReferenceObject in the AssetBundle? If it's .arobject then you will need to follow the steps listed here: #890 (comment) https://github.com/Unity-Technologies/arfoundation-samples/issues/890#issuecomment-947395116
— Reply to this email directly, view it on GitHub https://github.com/Unity-Technologies/arfoundation-samples/issues/938#issuecomment-1033231201, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA4KIK7IQJJ4FRR5EKPICFLU2G6NDANCNFSM5NNS6N3A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you authored the thread.Message ID: @.***>
Closing due to inactivity.
@oliverellmers Hi, I also encountered the same problem, did you solve it later? I test on 4.2.6,trackedObjectsChanged has no events callback
How do I... Dynamically Add XRReferenceObject's from AssetBundle to XRReferenceObject at runtime, and set ARTrackedObjectManager.ReferenceLibrary at runtime on iOS
I am storing
XRReferenceObject
's within Assetbundles that I am downloading and extractign at runtime. I am generating a newXRReferenceObjectLibrary
at runtime, and populating this with theXRReferenceObject
's in my AssetBundle, and then setting theARTrackedObjectManager.ReferenceLibrary
with the newly generatedXRReferenceObjectLibrary
as follows:When I run this in Editor and on my iOS device, everything seems to work as it should - the
ARTrackedObjectManager
has a newXRReferenceObjectLibrary
namedTestLib
, and iterating through thearTrackedObjectManager.referenceLibrary
to check comes back positive... but on iOS nothing happens. I recieve no events fromarTrackedObjectManager.trackedObjectsChanged += OnTrackedObjectChanged
nor are my prefabs spawned at the object targets location.Any help would be greatly appreciated!
Thanks,
O.