ARKit - Adding anchor to augmentation prefab at runtime.

Hello,

I am using ARKit Image detection for my project.

After the Image is detected, I am able to instantiate the 3D Model object(augmentation).But the spawning position is different.

So I have included a pan script to move the instantiated prefab (augmentation) to my desired position.

After I moved the augmentation to desired position, I want to lock the augmentation at the exact desired position.

As per my understanding, I have to add an anchor to the instantiated augmentation prefab in order to lock its position after I moved it to desired position.

But I am having trouble adding the anchor to the instantiated prefab at the runtime.

It would be very helpful, if you suggest which anchor (or) anchor method(Plane, User, Image) is appropriate and how to use them in unity - c# scripting.

Thank you in advanceā€¦ : )

Hi, Im also facing this issue, did you find the solution yet ?

https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@5.1/manual/features/anchors.html#adding-and-removing-anchors