void EnsureMinimumBuildTarget()
            {
                var userSetTargetVersion = OSVersion.Parse(PlayerSettings.iOS.targetOSVersionString);

                if (userSetTargetVersion < new OSVersion(11))
                {
                    throw new BuildFailedException($"You have selected a minimum target iOS version of {userSetTargetVersion} and have the ARKit package installed."
                                                   + "ARKit requires at least iOS version 11.0 (See Player Settings > Other Settings > Target minimum iOS Version).");
                }
            }
        public static void RegisterDescriptor()
        {
#if UNITY_IOS && !UNITY_EDITOR
            var iOSversion = OSVersion.Parse(Device.systemVersion);

            // No support before iOS 12.0
            if (iOSversion < new OSVersion(12))
            {
                return;
            }

            var capabilities = new XRObjectTrackingSubsystemDescriptor.Capabilities
            {
            };

            Register <ARKitXRObjectTrackingSubsystem>("ARKit-ObjectTracking", capabilities);
#endif
        }
            void EnsureMinimumXcodeVersion()
            {
#if UNITY_EDITOR_OSX
                var xcodeIndex   = Math.Max(0, XcodeApplications.GetPreferedXcodeIndex());
                var xcodeVersion = OSVersion.Parse(XcodeApplications.GetXcodeApplicationPublicName(xcodeIndex));
                if (xcodeVersion == new OSVersion(0))
                {
                    throw new BuildFailedException($"Could not determine which version of Xcode was selected in the Build Settings. Xcode app was computed as \"{XcodeApplications.GetXcodeApplicationPublicName(xcodeIndex)}\".");
                }

                if (xcodeVersion < new OSVersion(
                        k_TargetMinimumMajorXcodeVersion,
                        k_TargetMinimumMinorXcodeVersion,
                        k_TargetMinimumPatchXcodeVersion))
                {
                    throw new BuildFailedException($"The selected Xcode version: {xcodeVersion} is below the minimum Xcode required Xcode version for the Unity ARKit Plugin.  Please target at least Xcode version {k_TargetMinimumMajorXcodeVersion}.{k_TargetMinimumMinorXcodeVersion}.{k_TargetMinimumPatchXcodeVersion}.");
                }
#endif
            }
        static void RegisterDescriptor()
        {
#if UNITY_IOS && !UNITY_EDITOR
            var iOSversion = OSVersion.Parse(Device.systemVersion);

            // No support before iOS 11.3
            if (iOSversion < new OSVersion(11, 3))
            {
                return;
            }

            XRImageTrackingSubsystemDescriptor.Create(new XRImageTrackingSubsystemDescriptor.Cinfo
            {
                id = "ARKit-ImageTracking",
                subsystemImplementationType = typeof(ARKitImageTrackingSubsystem),
                supportsMovingImages        = (iOSversion >= new OSVersion(12))
            });
#endif
        }
Beispiel #5
0
        static void Register()
        {
#if UNITY_IOS && !UNITY_EDITOR
            const string subsystemId = "ARKit-EnvironmentProbe";
            XREnvironmentProbeSubsystemCinfo environmentProbeSubsystemInfo = new XREnvironmentProbeSubsystemCinfo()
            {
                id = subsystemId,
                implementationType            = typeof(ARKitEnvironmentProbeSubsystem),
                supportsManualPlacement       = true,
                supportsRemovalOfManual       = true,
                supportsAutomaticPlacement    = true,
                supportsRemovalOfAutomatic    = true,
                supportsEnvironmentTexture    = true,
                supportsEnvironmentTextureHDR = OSVersion.Parse(Device.systemVersion) >= new OSVersion(13),
            };

            if (!XREnvironmentProbeSubsystem.Register(environmentProbeSubsystemInfo))
            {
                Debug.LogErrorFormat("Cannot register the {0} subsystem", subsystemId);
            }
#endif
        }