private void _SetConfiguration(ARCoreSessionConfig config) { // There is no configuration to set. if (config == null) { return; } // The configuration has not been updated. if (m_CachedConfig != null && config.Equals(m_CachedConfig) && (config.AugmentedImageDatabase == null || !config.AugmentedImageDatabase.m_IsDirty) && !ExperimentManager.Instance.IsConfigurationDirty) { return; } if (InstantPreviewManager.IsProvidingPlatform) { if (config.LightEstimationMode != LightEstimationMode.Disabled) { InstantPreviewManager.LogLimitedSupportMessage("enable 'Light Estimation'"); config.LightEstimationMode = LightEstimationMode.Disabled; } if (config.AugmentedImageDatabase != null) { InstantPreviewManager.LogLimitedSupportMessage("enable 'Augmented Images'"); config.AugmentedImageDatabase = null; } if (config.AugmentedFaceMode == AugmentedFaceMode.Mesh) { InstantPreviewManager.LogLimitedSupportMessage("enable 'Augmented Faces'"); config.AugmentedFaceMode = AugmentedFaceMode.Disabled; } } var prestoConfig = new ApiPrestoConfig(config); ExternApi.ArPresto_setConfiguration(ref prestoConfig); m_CachedConfig = ScriptableObject.CreateInstance <ARCoreSessionConfig>(); m_CachedConfig.CopyFrom(config); }
public static extern void ArPresto_setConfiguration(ref ApiPrestoConfig config);