コード例 #1
0
        /// <summary>
        /// A callback before the build is started to enable IOS support.
        /// </summary>
        /// <param name="report">A report containing information about the build.</param>
        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");

                // Setup scripting define symbols:
                IOSSupportHelper.UpdateIOSScriptingDefineSymbols(
                    ARCoreExtensionsProjectSettings.Instance);

                // Setup CocoaPod templates:
                IOSSupportHelper.UpdateIOSPodDependencies(
                    arcoreiOSEnabled, IOSSupportHelper.ARCoreIOSDependencyFileName);
                Dictionary <string, bool> templates =
                    ARCoreExtensionsProjectSettings.Instance.GetIOSDependenciesStatus();
                foreach (var keyvalue in templates)
                {
                    IOSSupportHelper.UpdateIOSPodDependencies(
                        arcoreiOSEnabled && keyvalue.Value, keyvalue.Key);
                }
            }
        }
コード例 #2
0
        public override void OnGUI(string searchContext)
        {
            ARCoreExtensionsProjectSettingsGUI.OnGUI(false);

            if (GUI.changed)
            {
                IOSSupportHelper.UpdateIOSScriptingDefineSymbols(
                    ARCoreExtensionsProjectSettings.Instance);
                ARCoreExtensionsProjectSettings.Instance.Save();
            }
        }