public void OnPreprocessBuild(BuildReport report) { if (report.summary.platform == BuildTarget.iOS) { bool arcoreiOSEnabled = ARCoreExtensionsProjectSettings.Instance.IsIOSSupportEnabled; Debug.LogFormat("Building application with ARCore Extensions for AR Foundation " + "iOS Support {0}", arcoreiOSEnabled ? "ENABLED" : "DISABLED"); IOSSupportHelper.SetARCoreIOSSupportEnabled(arcoreiOSEnabled); } }
internal static void OnGUI(bool renderForStandaloneWindow) { bool newIOSEnabled = EditorGUILayout.Toggle(IsIOSSupportEnabled, ARCoreExtensionsProjectSettings.Instance.IsIOSSupportEnabled); GUILayout.Space(EditorGUIUtility.standardVerticalSpacing); s_FoldoutCloudAnchorAPIKeys = EditorGUILayout.Foldout(s_FoldoutCloudAnchorAPIKeys, CloudAnchorAPIKeys); if (s_FoldoutCloudAnchorAPIKeys) { // Draw text field for Android Cloud Anchor API Key. EditorGUILayout.BeginHorizontal(); GUILayout.Space(s_GroupLabelIndent); EditorGUILayout.LabelField(Android, GUILayout.Width(s_GroupFieldIndent)); ARCoreExtensionsProjectSettings.Instance.AndroidCloudServicesApiKey = EditorGUILayout.TextField( ARCoreExtensionsProjectSettings.Instance.AndroidCloudServicesApiKey); EditorGUILayout.EndHorizontal(); GUILayout.Space(EditorGUIUtility.standardVerticalSpacing); // Draw text field for iOS Cloud Anchor API Key. if (newIOSEnabled) { EditorGUILayout.BeginHorizontal(); GUILayout.Space(s_GroupLabelIndent); EditorGUILayout.LabelField(IOS, GUILayout.Width(s_GroupFieldIndent)); ARCoreExtensionsProjectSettings.Instance.IOSCloudServicesApiKey = EditorGUILayout.TextField( ARCoreExtensionsProjectSettings.Instance.IOSCloudServicesApiKey); EditorGUILayout.EndHorizontal(); GUILayout.Space(EditorGUIUtility.standardVerticalSpacing); } else { ARCoreExtensionsProjectSettings.Instance.IOSCloudServicesApiKey = string.Empty; } } if (GUI.changed) { if (newIOSEnabled != ARCoreExtensionsProjectSettings.Instance.IsIOSSupportEnabled) { ARCoreExtensionsProjectSettings.Instance.IsIOSSupportEnabled = newIOSEnabled; IOSSupportHelper.SetARCoreIOSSupportEnabled(newIOSEnabled); } ARCoreExtensionsProjectSettings.Instance.Save(); } }