Beispiel #1
0
        static void Register()
        {
            if (!Api.AtLeast12_0())
            {
                return;
            }

            const string subsystemId = "ARKit-EnvironmentProbe";
            XREnvironmentProbeSubsystemCinfo environmentProbeSubsystemInfo = new XREnvironmentProbeSubsystemCinfo()
            {
                id = subsystemId,
#if UNITY_2020_2_OR_NEWER
                providerType          = typeof(ARKitEnvironmentProbeSubsystem.ARKitProvider),
                subsystemTypeOverride = typeof(ARKitEnvironmentProbeSubsystem),
#else
                implementationType = typeof(ARKitEnvironmentProbeSubsystem),
#endif
                supportsManualPlacement       = true,
                supportsRemovalOfManual       = true,
                supportsAutomaticPlacement    = true,
                supportsRemovalOfAutomatic    = true,
                supportsEnvironmentTexture    = true,
                supportsEnvironmentTextureHDR = Api.AtLeast13_0(),
            };

            XREnvironmentProbeSubsystem.Register(environmentProbeSubsystemInfo);
        }
        static void Register()
        {
            if (!Api.platformAndroid || !Api.loaderPresent)
            {
                return;
            }

            const string subsystemId = "ARCore-EnvironmentProbe";
            XREnvironmentProbeSubsystemCinfo environmentProbeSubsystemInfo = new XREnvironmentProbeSubsystemCinfo()
            {
                id = subsystemId,
#if UNITY_2020_2_OR_NEWER
                providerType          = typeof(ARCoreEnvironmentProbeSubsystem.ARCoreProvider),
                subsystemTypeOverride = typeof(ARCoreEnvironmentProbeSubsystem),
#else
                implementationType = typeof(ARCoreEnvironmentProbeSubsystem),
#endif
                supportsManualPlacement       = false,
                supportsRemovalOfManual       = false,
                supportsAutomaticPlacement    = true,
                supportsRemovalOfAutomatic    = false,
                supportsEnvironmentTexture    = false,
                supportsEnvironmentTextureHDR = true,
            };

            XREnvironmentProbeSubsystem.Register(environmentProbeSubsystemInfo);
        }
        static void Register()
        {
            if (!Api.AtLeast12_0())
            {
                return;
            }

            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 = Api.AtLeast13_0(),
            };

            if (!XREnvironmentProbeSubsystem.Register(environmentProbeSubsystemInfo))
            {
                Debug.LogErrorFormat("Cannot register the {0} subsystem", subsystemId);
            }
        }
        static void Register()
        {
#if UNITY_IOS && !UNITY_EDITOR
            var iOSVersion = OSVersion.Parse(UnityEngine.iOS.Device.systemVersion);
            if (iOSVersion < new OSVersion(12))
            {
                return;
            }

            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 = iOSVersion >= new OSVersion(13),
            };

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

            const string subsystemId = "ARCore-EnvironmentProbe";
            XREnvironmentProbeSubsystemCinfo environmentProbeSubsystemInfo = new XREnvironmentProbeSubsystemCinfo()
            {
                id = subsystemId,
                implementationType            = typeof(ARCoreEnvironmentProbeSubsystem),
                supportsManualPlacement       = false,
                supportsRemovalOfManual       = false,
                supportsAutomaticPlacement    = true,
                supportsRemovalOfAutomatic    = false,
                supportsEnvironmentTexture    = false,
                supportsEnvironmentTextureHDR = true,
            };

            if (!XREnvironmentProbeSubsystem.Register(environmentProbeSubsystemInfo))
            {
                Debug.LogError($"Cannot register the {subsystemId} subsystem");
            }
        }
Beispiel #6
0
        static void Register()
        {
            XREnvironmentProbeSubsystemCinfo environmentProbeSubsystemInfo = new XREnvironmentProbeSubsystemCinfo()
            {
                id = k_SubsystemId,
                implementationType         = typeof(ARKitEnvironmentProbeSubsystem),
                supportsManualPlacement    = true,
                supportsRemovalOfManual    = true,
                supportsAutomaticPlacement = true,
                supportsRemovalOfAutomatic = true,
                supportsEnvironmentTexture = true,
            };

            if (!XREnvironmentProbeSubsystem.Register(environmentProbeSubsystemInfo))
            {
                Debug.LogErrorFormat("Cannot register the {0} subsystem", k_SubsystemId);
            }
        }
Beispiel #7
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,
            };

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