XR Environment Prefab is moved!

I am currenly using 6000.0.25f1 version, 3Dmobile template with installed ARFoundations and Google AR Core packages. I am using XR Environment. I have a marker loaded in it as a GameObject with a Simulated Tracked image script. I have created a nested prefab from 4 prefabs, loaded it to the XR Environment, set up the size rotation etc, drag&dropped it to the assets folder (created an original prefab) and attached it to the AR Tracked image library as a tracked image prefab. When I start the visualization, my prefab is moved along the z axis! How to fix it?

What is the “3Dmobile template with installed ARFoundations and Google AR Core packages”?

1 Like

3D Mobile is one of the project templates available in the Unity Hub when starting a new project: Manage your templates | Unity Hub | 3.0

Have you tried just instantiating the prefab yourself from code without using it in an AR scene? Typically these sorts of issues are due to an offset in the Transform of one of your prefab GameObjects.

AR Foundation is just spawning your prefab and parenting it to the XR Origin: com.unity.xr.arfoundation/Runtime/ARFoundation/ARTrackableManager.cs at master · needle-mirror/com.unity.xr.arfoundation · GitHub

1 Like