5G-MAG / rt-xr-unity-player

XR Unity Player
https://5g-mag.github.io/Getting-Started/pages/xr-media-integration-in-5g/
Other
4 stars 1 forks source link

Support Unity 2022 LTS and above #37

Closed nlsdvl closed 2 months ago

nlsdvl commented 3 months ago

The anchoring feature has been implemented using the Unity 2021 and currently doesn't support 2022.

When Loading the project in Unity 2022, the package manager ignores package-lock.json and forces updates of the dependencies. AR Foundation gets updated from 4.2.10 to 5.1.4 resulting in a breaking change :

  1. Packages\com.atteneder.gltfast\Runtime\Scripts\ARUtilities.cs(21,9): error CS0246: The type or namespace name 'XROrigin' could not be found (are you missing a using directive or an assembly reference?)
  2. script compuilation symbol ARCORE_USE_ARF_5 should be defined
  3. ARSessionOrigin is deprecated, XROrigin should be used instead
nlsdvl commented 3 months ago

This was due to the AR foundation package version not being specified in the dependencies. As a result, installing manually was pulling the latest version of the package when using Unity 2022, which wasn't compatible. Unity 2022 has been verified to work.