Compatibility with compilation on tvOS

Hi,

We’re trying to merge our visionOS support branch together into a state where we can compile for all our supported platforms from a single branch. Ever since the new updates (unity 2022.3.18 and polyspatial 1.0.3) we have been successful in making builds for iOS and Mac platforms. However we are running into a couple of issues caused by XR and visionOS blocking us from making tvOS builds:

  • The XR package does not compile on tvOS platforms due to XRDeviceDescriptor, XRFeatureDescriptor and FeatureType being referenced in the Unity.XR.Hands package. These are conditionally compiled out but still referenced in other code. We worked around this temporarily by defining UNITY_GAMECORE and UNITY_INPUT_SYSTEM_ENABLE_XR for the tvOS target to ensure the code is available.

  • It looks like there are a bunch of native code meant for visionOS which is for some reason also marked for being available for tvOS. This is causing compiler issues in XCode. (UnityMain.swift, UnityLibrary.swift, UnityVisionOS.m, VisionOSAppController.mm)

Are these intentionally included for tvOS or is this a bug?

1 Like

This sounds like a bug. Can you please file a bug report and post the incident ID here? We’ll get this tracked and teed up as soon as we can.

Thanks! I’ve made an incident report: IN-67280

1 Like

Just checked and unfortunately not yet fixed in version 1.1.4.
We would really love to merge our separate branches for different platforms but cannot because of this.