#pragma warning restore 649

        public ReturnCode Run()
        {
            var    settings     = m_BuildParameters.GetScriptCompilationSettings();
            string outputFolder = m_BuildParameters.GetOutputFilePathForIdentifier(BuilderConsts.OutputAssemblies);
            var    results      = PlayerBuildInterface.CompilePlayerScripts(settings, outputFolder);

            if (results.assemblies == null || !results.assemblies.Any())
            {
                return(ReturnCode.Error);
            }

            string[] asmdefGuids = AssetDatabase.FindAssets("t:Asmdef", new[] { m_ModificationParameters.ScriptsPath });
            string[] asmdefNames = asmdefGuids
                                   .Select(AssetDatabase.GUIDToAssetPath)
                                   .Select(AssetDatabase.LoadAssetAtPath <AssemblyDefinitionAsset>)
                                   .Select(GetAssemblyName)
                                   .ToArray();
            foreach (string filePath in Directory.GetFiles(outputFolder))
            {
                if (asmdefNames.All(i => !filePath.Contains(i)))
                {
                    File.Delete(filePath);
                }
            }

            return(ReturnCode.Success);
        }
Esempio n. 2
0
#pragma warning restore 649

        /// <inheritdoc />
        public ReturnCode Run()
        {
            if (m_Parameters.ScriptInfo != null)
            {
                BuildCacheUtility.SetTypeDB(m_Parameters.ScriptInfo);
                return(ReturnCode.SuccessNotRun);
            }

            // We need to ensure the directory is empty so prior results or other artifacts in this directory do not influence the build result
            if (Directory.Exists(m_Parameters.ScriptOutputFolder))
            {
                Directory.Delete(m_Parameters.ScriptOutputFolder, true);
                Directory.CreateDirectory(m_Parameters.ScriptOutputFolder);
            }

            m_Results.ScriptResults = PlayerBuildInterface.CompilePlayerScripts(m_Parameters.GetScriptCompilationSettings(), m_Parameters.ScriptOutputFolder);
            m_Parameters.ScriptInfo = m_Results.ScriptResults.typeDB;
            BuildCacheUtility.SetTypeDB(m_Parameters.ScriptInfo);

            if (m_Results.ScriptResults.assemblies.IsNullOrEmpty() && m_Results.ScriptResults.typeDB == null)
            {
                return(ReturnCode.Error);
            }
            return(ReturnCode.Success);
        }
Esempio n. 3
0
    private static void CompileTest(BuildTarget buildTarget, BuildTargetGroup buildTargetGroup, bool isDevelopmentBuild)
    {
        const string tempBuildPath = "Temp/CompileTest";

        var settings = new ScriptCompilationSettings
        {
            target  = buildTarget,
            group   = buildTargetGroup,
            options = isDevelopmentBuild ? ScriptCompilationOptions.DevelopmentBuild : ScriptCompilationOptions.None
        };

        var result = PlayerBuildInterface.CompilePlayerScripts(settings, tempBuildPath);

        if (result.assemblies == null || !result.assemblies.Any() || result.typeDB == null)
        {
            throw new Exception("compile error");
        }

        Debug.Log($"Compile Test Success! - BuildTarget: {settings.target}");

        // NOTE: tempBuildPathにはコンパイル後のDLLが吐き出されている
        if (Directory.Exists(tempBuildPath))
        {
            Directory.Delete(tempBuildPath, true);
        }
    }
Esempio n. 4
0
        private List <string> GetPlayerAssemblies()
        {
            List <string> assemblies = new List <string>();

#if UNITY_2018_2_OR_NEWER
            var outputFolder = FileUtil.GetUniqueTempPathInProject();
            if (Directory.Exists(outputFolder))
            {
                Directory.Delete(outputFolder, true);
            }

            ScriptCompilationSettings input = new ScriptCompilationSettings();
            input.target = EditorUserBuildSettings.activeBuildTarget;
            input.@group = EditorUserBuildSettings.selectedBuildTargetGroup;

            var compilationResult = PlayerBuildInterface.CompilePlayerScripts(input, outputFolder);
            foreach (var assembly in compilationResult.assemblies)
            {
                assemblies.Add(Path.Combine(outputFolder, assembly));
            }
#else
            // fallback to CompilationPipeline assemblies
            foreach (var playerAssembly in m_PlayerAssemblies)
            {
                assemblies.Add(playerAssembly.outputPath);
            }
#endif
            return(assemblies);
        }
    static void BuildAllAssetBundles()
    {
        string assetBundleDirectory = "Assets/AssetBundles";

        if (!Directory.Exists(assetBundleDirectory))
        {
            Directory.CreateDirectory(assetBundleDirectory);
        }

        CompilationPipeline.compilationFinished += OnCompilationFinished;

        var input = new ScriptCompilationSettings
        {
            target = BuildTarget.StandaloneWindows,
            group  = BuildTargetGroup.Standalone,
        };

        string dllpath = $"{Application.streamingAssetsPath}/Assemblies";

        if (!Directory.Exists(Application.streamingAssetsPath))
        {
            Directory.CreateDirectory(Application.streamingAssetsPath);
        }

        PlayerBuildInterface.CompilePlayerScripts(input, dllpath);

        BuildPipeline.BuildAssetBundles(assetBundleDirectory,
                                        BuildAssetBundleOptions.None,
                                        BuildTarget.StandaloneWindows);

        string source = $"{assetBundleDirectory}/valheimtwitchgui";
        string target = $"{destDir}\\valheimtwitchgui";

        FileUtil.ReplaceFile(source, target);
    }
Esempio n. 6
0
    public static ScriptCompilationResult CompileScripts()
    {
        ScriptCompilationSettings input = new ScriptCompilationSettings();

        input.target       = EditorUserBuildSettings.activeBuildTarget;
        input.targetGroup  = EditorUserBuildSettings.selectedBuildTargetGroup;
        input.options      = ScriptCompilationOptions.None;
        input.outputFolder = "Library/ScriptAssemblies";
        return(PlayerBuildInterface.CompilePlayerScripts(input));
    }
Esempio n. 7
0
        //生成特定平台的patch
        public static void GenPlatformPatch(Platform platform, string patchOutputDir,
                                            string corePath = "./Assets/Plugins/IFix.Core.dll")
        {
            var outputDir = "Temp/ifix";

            Directory.CreateDirectory("Temp");
            Directory.CreateDirectory(outputDir);
#if UNITY_2018_3_OR_NEWER
            ScriptCompilationSettings scriptCompilationSettings = new ScriptCompilationSettings();
            if (platform == Platform.android)
            {
                scriptCompilationSettings.group  = BuildTargetGroup.Android;
                scriptCompilationSettings.target = BuildTarget.Android;
            }
            else if (platform == Platform.ios)
            {
                scriptCompilationSettings.group  = BuildTargetGroup.iOS;
                scriptCompilationSettings.target = BuildTarget.iOS;
            }
            else
            {
                scriptCompilationSettings.group  = BuildTargetGroup.Standalone;
                scriptCompilationSettings.target = BuildTarget.StandaloneWindows;
            }

            ScriptCompilationResult scriptCompilationResult = PlayerBuildInterface.CompilePlayerScripts(scriptCompilationSettings, outputDir);

            foreach (var assembly in injectAssemblys)
            {
                if (!Directory.Exists(patchOutputDir))
                {
                    Directory.CreateDirectory(patchOutputDir);
                }

                GenPatch(assembly, string.Format("{0}/{1}.dll", outputDir, assembly),
                         "./Assets/Plugins/IFix.Core.dll", string.Format("{0}{1}.patch.bytes", patchOutputDir, assembly));
            }
#else
            throw new NotImplementedException();
            //var compileArgFile = "Temp/ifix/unity_" + platform + "_compile_argument";
            //var tmpDllPath = "Temp/ifix/Assembly-CSharp.dll";
            //File.WriteAllText(compileArgFile, getCompileArguments(platform, tmpDllPath));
            //先编译dll到Temp目录下
            //Compile(compileArgFile);
            //对编译后的dll生成补丁
            //GenPatch("Assembly-CSharp", tmpDllPath, corePath, patchPath);

            //File.Delete(compileArgFile);
            //File.Delete(tmpDllPath);
            //File.Delete(tmpDllPath + ".mdb");
#endif
        }
        /// <summary>
        /// 检测代码
        /// </summary>
        /// <returns></returns>
        public static bool CheckCode()
        {
            //检查下打包前的代码错
            var setting = new ScriptCompilationSettings();

            setting.options = ScriptCompilationOptions.Assertions;
            setting.target  = BuildTarget.Android;
            var ret = PlayerBuildInterface.CompilePlayerScripts(setting, BApplication.Library + "/BuildTest");

            if (ret.assemblies.Contains("Assembly-CSharp.dll"))
            {
                return(true);
            }
            return(false);
        }
Esempio n. 9
0
#pragma warning restore 649

        /// <inheritdoc />
        public ReturnCode Run()
        {
            if (m_Parameters.ScriptInfo != null)
            {
                return(ReturnCode.SuccessNotRun);
            }

            m_Results.ScriptResults = PlayerBuildInterface.CompilePlayerScripts(m_Parameters.GetScriptCompilationSettings(), m_Parameters.ScriptOutputFolder);
            m_Parameters.ScriptInfo = m_Results.ScriptResults.typeDB;

            if (m_Results.ScriptResults.assemblies.IsNullOrEmpty() && m_Results.ScriptResults.typeDB == null)
            {
                return(ReturnCode.Error);
            }
            return(ReturnCode.Success);
        }
Esempio n. 10
0
    public static void CompilerCode()
    {
        Debug.Log("<<<compiling code<<<<");
        ScriptCompilationSettings scriptCompilationSettings = new ScriptCompilationSettings();

        scriptCompilationSettings.target  = BuildTarget.StandaloneWindows64;
        scriptCompilationSettings.group   = BuildTargetGroup.Standalone;
        scriptCompilationSettings.options = ScriptCompilationOptions.DevelopmentBuild;
        string dllpath = Application.streamingAssetsPath + "/my.dll";

        if (!Directory.Exists(Application.streamingAssetsPath))
        {
            Directory.CreateDirectory(Application.streamingAssetsPath);
        }
        PlayerBuildInterface.CompilePlayerScripts(scriptCompilationSettings, dllpath);
        Debug.Log("<<<compiling code<<<<");
    }
Esempio n. 11
0
        private static void Check(BuildTarget target)
        {
            var group = BuildPipeline.GetBuildTargetGroup(target);

            var input = new ScriptCompilationSettings
            {
                target = target,
                group  = group,
            };

            PlayerBuildInterface.CompilePlayerScripts(input, OUTPUT_FOLDER);

            if (Directory.Exists(OUTPUT_FOLDER))
            {
                Directory.Delete(OUTPUT_FOLDER, true);
            }
        }
Esempio n. 12
0
#pragma warning restore 649

        public ReturnCode Run()
        {
            if (m_Parameters.ScriptInfo != null)
            {
                return(ReturnCode.SuccessNotRun);
            }

            // TODO: Replace with call to GetTempOrCachePath
            // TODO: Create tasks to copy scripts to correct output folder?
            m_Results.ScriptResults = PlayerBuildInterface.CompilePlayerScripts(m_Parameters.GetScriptCompilationSettings(), m_Parameters.TempOutputFolder);
            m_Parameters.ScriptInfo = m_Results.ScriptResults.typeDB;

            if (m_Results.ScriptResults.assemblies.IsNullOrEmpty() && m_Results.ScriptResults.typeDB == null)
            {
                return(ReturnCode.Error);
            }
            return(ReturnCode.Success);
        }
Esempio n. 13
0
    private static void CheckCompilePlayerScripts(ScriptCompilationSettings settings)
    {
        EditorUtility.DisplayProgressBar("Check Compile Player Scripts", "Do not operate the computer", 0);
        ScriptCompilationResult result = PlayerBuildInterface.CompilePlayerScripts(settings, string.Format("{0}/Unity_{1}/", System.IO.Path.GetTempPath(), GUID.Generate()));

        EditorUtility.ClearProgressBar();

        if ((result.assemblies == null ||
             result.assemblies.Count == 0) &&
            result.typeDB == null)
        {
            EditorUtility.DisplayDialog("Check Compile Player Scripts", "Failed\nSee Console Window", "OK");
        }
        else
        {
            EditorUtility.DisplayDialog("Check Compile Player Scripts", "Success", "OK");
        }
    }
Esempio n. 14
0
        //生成特定平台的patch
        public static void GenPlatformPatch(Platform platform, string patchOutputDir,
                                            string corePath = CoreDllPath)
        {
            var outputDir = "Temp/ifix";

            Directory.CreateDirectory("Temp");
            Directory.CreateDirectory(outputDir);
#if UNITY_2018_3_OR_NEWER
            ScriptCompilationSettings scriptCompilationSettings = new ScriptCompilationSettings();
            if (platform == Platform.android)
            {
                scriptCompilationSettings.group  = BuildTargetGroup.Android;
                scriptCompilationSettings.target = BuildTarget.Android;
            }
            else if (platform == Platform.ios)
            {
                scriptCompilationSettings.group  = BuildTargetGroup.iOS;
                scriptCompilationSettings.target = BuildTarget.iOS;
            }
            else
            {
                scriptCompilationSettings.group  = BuildTargetGroup.Standalone;
                scriptCompilationSettings.target = BuildTarget.StandaloneWindows;
            }

            ScriptCompilationResult scriptCompilationResult = PlayerBuildInterface.CompilePlayerScripts(scriptCompilationSettings, outputDir);

            // 走自定义生成补丁函数,统一处理
            CustomizedGenPatch();
#else
            throw new NotImplementedException();
            //var compileArgFile = "Temp/ifix/unity_" + platform + "_compile_argument";
            //var tmpDllPath = "Temp/ifix/Assembly-CSharp.dll";
            //File.WriteAllText(compileArgFile, getCompileArguments(platform, tmpDllPath));
            //先编译dll到Temp目录下
            //Compile(compileArgFile);
            //对编译后的dll生成补丁
            //GenPatch("Assembly-CSharp", tmpDllPath, corePath, patchPath);

            //File.Delete(compileArgFile);
            //File.Delete(tmpDllPath);
            //File.Delete(tmpDllPath + ".mdb");
#endif
        }
        IEnumerable <string> CompilePlayerAssemblies(Assembly[] assemblies, IProgressBar progressBar = null)
        {
            if (progressBar != null)
            {
                var numAssemblies = assemblies.Length;
                progressBar.Initialize("Assembly Compilation", "Compiling project scripts",
                                       numAssemblies);
                m_OnAssemblyCompilationStarted = s =>
                {
                    // The compilation pipeline might compile Editor-specific assemblies
                    // let's advance the progress bar only for Player ones.
                    var assemblyName = Path.GetFileNameWithoutExtension(s);
                    if (assemblies.FirstOrDefault(asm => asm.name.Equals(assemblyName)) != null)
                    {
                        progressBar.AdvanceProgressBar(assemblyName);
                    }
                };
                CompilationPipeline.assemblyCompilationStarted += m_OnAssemblyCompilationStarted;
            }
            CompilationPipeline.assemblyCompilationFinished += OnAssemblyCompilationFinished;

            m_OutputFolder = FileUtil.GetUniqueTempPathInProject();

            var input = new ScriptCompilationSettings
            {
                target = EditorUserBuildSettings.activeBuildTarget,
                group  = EditorUserBuildSettings.selectedBuildTargetGroup
            };

            var compilationResult = PlayerBuildInterface.CompilePlayerScripts(input, m_OutputFolder);

            if (progressBar != null)
            {
                progressBar.ClearProgressBar();
            }

            if (!m_Success)
            {
                Dispose();
                throw new AssemblyCompilationException();
            }

            return(compilationResult.assemblies.Select(assembly => Path.Combine(m_OutputFolder, assembly)));
        }
Esempio n. 16
0
    public static void BuildDll()
    {
        string outputDir = ".";
        var    target    = EditorUserBuildSettings.activeBuildTarget;
        var    group     = BuildPipeline.GetBuildTargetGroup(target);

        ScriptCompilationSettings scriptCompilationSettings = new ScriptCompilationSettings();

        scriptCompilationSettings.group  = group;
        scriptCompilationSettings.target = target;
        var buildDir = $"{outputDir}/build";

        if (false == Directory.Exists(buildDir))
        {
            Directory.CreateDirectory(buildDir);
        }
        ScriptCompilationResult scriptCompilationResult = PlayerBuildInterface.CompilePlayerScripts(scriptCompilationSettings, buildDir);

        //MoveAssemblys(outputDir, buildDir, true);
    }
Esempio n. 17
0
        public static bool CompileAssemblies()
        {
#if UNITY_2018_2_OR_NEWER
            var path = compiledAssemblyPaths.FirstOrDefault();
            if (!string.IsNullOrEmpty(path))
            {
                Directory.Delete(Path.GetDirectoryName(path), true);
            }
            compiledAssemblyPaths.Clear();
            var outputFolder = FileUtil.GetUniqueTempPathInProject();
            if (Directory.Exists(outputFolder))
            {
                Directory.Delete(outputFolder, true);
            }

            ScriptCompilationSettings input = new ScriptCompilationSettings
            {
                target = EditorUserBuildSettings.activeBuildTarget,
                @group = EditorUserBuildSettings.selectedBuildTargetGroup
            };

            var compilationResult = PlayerBuildInterface.CompilePlayerScripts(input, outputFolder);

            foreach (var assembly in compilationResult.assemblies)
            {
                compiledAssemblyPaths.Add(Path.Combine(outputFolder, assembly));
            }

            return(compilationResult.assemblies.Count > 0);
#else
            compiledAssemblyPaths.Clear();
            // fallback to CompilationPipeline assemblies
            foreach (var playerAssembly in CompilationPipeline.GetAssemblies().Where(a => a.flags != AssemblyFlags.EditorAssembly))
            {
                compiledAssemblyPaths.Add(playerAssembly.outputPath);
            }

            return(true);
#endif
        }
Esempio n. 18
0
        //生成特定平台的patch
        public static void GenPlatformPatch(BuildTargetGroup group, BuildTarget buildTarget,
                                            string corePath = IFixCoreDllPath)
        {
#if UNITY_2018_3_OR_NEWER
            RuntimePlatform           rplatform;
            ScriptCompilationSettings scriptCompilationSettings = new ScriptCompilationSettings()
            {
                group  = group,
                target = buildTarget,
            };

            var patchOutputDir = $"Assets/AppRes/ifix/{IFixCfg.TargetName(buildTarget)}/";
            Directory.CreateDirectory(patchOutputDir);

            var assemblyOutputDir = $"obj/{IFixCfg.TargetName(buildTarget)}/";
            Directory.CreateDirectory(assemblyOutputDir);
            ScriptCompilationResult scriptCompilationResult = PlayerBuildInterface.CompilePlayerScripts(scriptCompilationSettings, assemblyOutputDir);

            foreach (var assembly in injectAssemblys)
            {
                GenPatch(assembly, string.Format("{0}/{1}.dll", assemblyOutputDir, assembly),
                         IFixCoreDllPath, string.Format("{0}{1}.patch.ifix", patchOutputDir, assembly));
            }
#else
            throw new NotImplementedException();
            //var compileArgFile = "Temp/ifix/unity_" + platform + "_compile_argument";
            //var tmpDllPath = "Temp/ifix/Assembly-CSharp.dll";
            //File.WriteAllText(compileArgFile, getCompileArguments(platform, tmpDllPath));
            //先编译dll到Temp目录下
            //Compile(compileArgFile);
            //对编译后的dll生成补丁
            //GenPatch("Assembly-CSharp", tmpDllPath, corePath, patchPath);

            //File.Delete(compileArgFile);
            //File.Delete(tmpDllPath);
            //File.Delete(tmpDllPath + ".mdb");
#endif
        }
        /// <returns>是否成功</returns>
        public static bool CompilePlayerScripts(ScriptCompilationSettings settings, string outputFolder, bool displayUI, out ScriptCompilationResult result)
        {
            if (displayUI)
            {
                EditorUtility.DisplayProgressBar($"Compile Player Scripts ({settings.target})", "Do not operate the computer", 0);
            }
            result = PlayerBuildInterface.CompilePlayerScripts(settings, outputFolder);
            EditorUtility.ClearProgressBar();

            if (result.assemblies != null &&
                result.assemblies.Count > 0 &&
                result.typeDB != null)
            {
                if (settings.target == EditorUserBuildSettings.activeBuildTarget)
                {
                    s_CurrentTargetTypeDBCache = result.typeDB;
                }

                if (displayUI)
                {
                    EditorUtility.DisplayDialog("Check Compile Player Scripts"
                                                , $"Success\n{settings.target}: {settings.options}"
                                                , "OK");
                }
                return(true);
            }
            else
            {
                if (displayUI)
                {
                    EditorUtility.DisplayDialog("Check Compile Player Scripts"
                                                , $"Failed\n{settings.target}: {settings.options}\nSee Console Window"
                                                , "OK");
                }
                return(false);
            }
        }
Esempio n. 20
0
        public override BuildPipelineCodes Convert(ScriptCompilationSettings settings, string outputFolder, out ScriptCompilationResult output)
        {
            StartProgressBar("Compiling Player Scripts", 1);

            if (!UpdateProgressBar(""))
            {
                output = new ScriptCompilationResult();
                EndProgressBar();
                return(BuildPipelineCodes.Canceled);
            }

            Hash128 hash = CalculateInputHash(settings);

            if (UseCache && TryLoadFromCache(hash, outputFolder, out output))
            {
                EndProgressBar();
                return(BuildPipelineCodes.SuccessCached);
            }

            output = PlayerBuildInterface.CompilePlayerScripts(settings, outputFolder);
            if (output.assemblies.IsNullOrEmpty() && output.typeDB == null)
            {
                return(BuildPipelineCodes.Error);
            }

            if (UseCache && !TrySaveToCache(hash, output, outputFolder))
            {
                BuildLogger.LogWarning("Unable to cache ScriptDependency results.");
            }

            if (!EndProgressBar())
            {
                return(BuildPipelineCodes.Canceled);
            }
            return(BuildPipelineCodes.Success);
        }
Esempio n. 21
0
        private static void Check(BuildTarget target, BuildTargetGroup group)
        {
            var input = new ScriptCompilationSettings
            {
                target = target,
                group  = group,
            };

            var result     = PlayerBuildInterface.CompilePlayerScripts(input, OUTPUT_FOLDER);
            var assemblies = result.assemblies;

            var isSuccess =
                assemblies != null &&
                assemblies.Count != 0 &&
                result.typeDB != null
            ;

            if (Directory.Exists(OUTPUT_FOLDER))
            {
                Directory.Delete(OUTPUT_FOLDER, true);
            }

            Assert.IsTrue(isSuccess);
        }
Esempio n. 22
0
        // 采用新的ScriptableBuildPipeline
        private static void InternalScriptableBuildAndPushDll()
        {
            EditorUtility.DisplayProgressBar("BuildingDll", "Building Dll...", 0);

            string projectPath  = Application.dataPath.Replace("Assets", "");
            string srcDllFolder = $@"{projectPath}AndroidDll/{Application.productName}";
            ScriptCompilationSettings scriptCompilationSettings = new ScriptCompilationSettings();

            scriptCompilationSettings.group  = BuildTargetGroup.Android;
            scriptCompilationSettings.target = BuildTarget.Android;
            try
            {
                ScriptCompilationResult scriptCompilationResult = PlayerBuildInterface.CompilePlayerScripts(scriptCompilationSettings, srcDllFolder);
                string srcDllPath = $@"{srcDllFolder}/{DLL_NAME}";
                PushDll(srcDllPath);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                throw;
            }

            EditorUtility.ClearProgressBar();
        }
        public IEnumerable <AssemblyInfo> Compile(IProgressBar progressBar = null)
        {
#if UNITY_2018_1_OR_NEWER
            var assemblies = CompilationPipeline.GetAssemblies(AssembliesType.Player);
#else
            var assemblies = CompilationPipeline.GetAssemblies();
#endif

#if UNITY_2018_2_OR_NEWER
            if (progressBar != null)
            {
                var numAssemblies = assemblies.Length;
                progressBar.Initialize("Assembly Compilation", "Compiling project scripts",
                                       numAssemblies);
                m_OnAssemblyCompilationStarted = (s) =>
                {
                    progressBar.AdvanceProgressBar(Path.GetFileName(s));
                };
                CompilationPipeline.assemblyCompilationStarted += m_OnAssemblyCompilationStarted;
            }
            CompilationPipeline.assemblyCompilationFinished += OnAssemblyCompilationFinished;

            m_OutputFolder = FileUtil.GetUniqueTempPathInProject();

            var input = new ScriptCompilationSettings
            {
                target = EditorUserBuildSettings.activeBuildTarget,
                group  = EditorUserBuildSettings.selectedBuildTargetGroup
            };

            var compilationResult = PlayerBuildInterface.CompilePlayerScripts(input, m_OutputFolder);

            if (progressBar != null)
            {
                progressBar.ClearProgressBar();
            }

            if (!m_Success)
            {
                Dispose();
                throw new AssemblyCompilationException();
            }

            var compiledAssemblyPaths = compilationResult.assemblies.Select(assembly => Path.Combine(m_OutputFolder, assembly));
#else
            // fallback to CompilationPipeline assemblies
            var compiledAssemblyPaths = CompilationPipeline.GetAssemblies()
                                        .Where(a => a.flags != AssemblyFlags.EditorAssembly).Select(assembly => assembly.outputPath);
#endif

            var assemblyInfos = new List <AssemblyInfo>();
            foreach (var compiledAssemblyPath in compiledAssemblyPaths)
            {
                var assemblyInfo = AssemblyHelper.GetAssemblyInfoFromAssemblyPath(compiledAssemblyPath);
                var assembly     = assemblies.First(a => a.name.Equals(assemblyInfo.name));
                var sourcePaths  = assembly.sourceFiles.Select(file => file.Remove(0, assemblyInfo.relativePath.Length + 1));

                assemblyInfo.sourcePaths = sourcePaths.ToArray();
                assemblyInfos.Add(assemblyInfo);
            }

            return(assemblyInfos);
        }