Upgrading to Unity 6 broke Teleportation Area

Hello,
I have recently upgraded to Unity 6, but I have noticed an issue where my Teleport Raycast will no longer track on the Teleportation Area laid across my scene. I will receive this error when trying to move the raycast to the area.

NullReferenceException: Object reference not set to an instance of an object UnityEngine.XR.Interaction.Toolkit.Locomotion.Teleportation.BaseTeleportationInteractable.GetReticleDirection (UnityEngine.XR.Interaction.Toolkit.Interactors.IXRInteractor interactor, UnityEngine.Vector3 hitNormal, UnityEngine.Vector3& reticleUp, System.Nullable1[UnityEngine.Vector3]& optionalReticleForward) (at ./Library/PackageCache/com.unity.xr.interaction.toolkit/Runtime/Locomotion/Teleportation/BaseTeleportationInteractable.cs:466)UnityEngine.XR.Interaction.Toolkit.Interactors.Visuals.XRInteractorLineVisual.AssignReticle (System.Boolean useBlockedVisuals) (at ./Library/PackageCache/com.unity.xr.interaction.toolkit/Runtime/Interaction/Interactors/Visuals/XRInteractorLineVisual.cs:1226) UnityEngine.XR.Interaction.Toolkit.Interactors.Visuals.XRInteractorLineVisual.UpdateLineVisual () (at ./Library/PackageCache/com.unity.xr.interaction.toolkit/Runtime/Interaction/Interactors/Visuals/XRInteractorLineVisual.cs:881) UnityEngine.XR.Interaction.Toolkit.Interactors.Visuals.XRInteractorLineVisual.OnBeforeRenderLineVisual () (at ./Library/PackageCache/com.unity.xr.interaction.toolkit/Runtime/Interaction/Interactors/Visuals/XRInteractorLineVisual.cs:716) UnityEngine.BeforeRenderHelper.Invoke () (at <84f0d810adef4e6c8deab33e4ae93f7c>:0) UnityEngine.Application.InvokeOnBeforeRender () (at <84f0d810adef4e6c8deab33e4ae93f7c>:0) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

Please let me know if you need any more information

Hello there! Yes, please let us know what version of XRI you are using and what version of the editor.

The editor is (6000.0.34f1) and the XRI version is 3.0.7

You said you upgraded to Unity 6, so I assume you came from 2021.3 or 2022.3 with XRI 2.5.x or 2.6.x. In that case, the error you are seeing is because your scene setup has changed. If you pull in the latest Starter Assets sample for XRI from Package Manager, there is an updated prefab that is configured to handle the locomotion correctly. You can use that as a reference to update your existing setup. We also have the locomotion changes laid out in our XRI 3 migration guide, but please let us know if that does not help solve the problem so we can update it.

After I installed the new Starter Asset package and restarted Unity, everything worked as before! Thank you!

Hey Dave, I am facing the same error, except that: I load my XR rig into my scenes via addressbles. This seems to cause the same error even though I am using the XR Rig Prefab from XRI 3.0.8. Would you be so kind as to explain a little more about what is causing this problem, as I cannot find the object that is supposed to be null when debugging.

What I have tested so far: When putting the XR Rig directly into the Scene Bundle it works as expected. But since I have separated scene and my “infrastructure” I still run into the same error.

Unity 6000.0.25f1
Addressables 2.2.2

In case anyone is experiencing the same error. Here is what I did to solve this problem: The null reference is caused by the teleportationProvider in BaseTeleportationInteractable. To get around this, I checked for null and reassinged the teleportationProvider in BaseTeleportationInteractable. To do so, I created a custom version of the XRI Toolkit package by copying it from “./Library/PackageCache/…” to “./Package/…”. You can then modify the package.