示例#1
0
 /// <summary>
 /// A callback before the build is started to manage the dependencies.
 /// </summary>
 /// <param name="report">A report containing information about the build.</param>
 public void OnPreprocessBuild(BuildReport report)
 {
     UnityEditor.BuildTarget buildTarget = report.summary.platform;
     if (buildTarget == UnityEditor.BuildTarget.Android)
     {
         ExternalDependencyResolverHelper.ClearDependencies();
         ManageAndroidDependencies(ARCoreExtensionsProjectSettings.Instance);
     }
     else if (buildTarget == UnityEditor.BuildTarget.iOS &&
              ARCoreExtensionsProjectSettings.Instance.IsIOSSupportEnabled)
     {
         ExternalDependencyResolverHelper.EnableDependencyResolver(
             ExternalDependencyResolverHelper.IOSResolverName);
     }
 }
示例#2
0
        public static void OnPostprocessBuild(
            UnityEditor.BuildTarget target, string pathToBuiltProject)
        {
            if (!UnityEditorInternal.InternalEditorUtility.inBatchMode)
            {
                // Only clean up resolver in Batch Mode.
                return;
            }

            if (target == UnityEditor.BuildTarget.Android)
            {
                Debug.Log("ARCoreExtensions: Cleaning up Android library dependencies.");
                ExternalDependencyResolverHelper.ClearDependencies();
            }
        }