public void Build(IEnumerable <GraphAssetModel> graphAssetModels, Action <string, CompilerMessage[]> roslynCompilationOnBuildFinished) { var scriptSourcePath = ModelUtility.GetCompileScriptsOutputDirectory(); if (Directory.Exists(scriptSourcePath)) { foreach (var path in Directory.GetFiles(scriptSourcePath)) { File.Delete(path); } } else { Directory.CreateDirectory(scriptSourcePath); } foreach (var graphAssetModel in graphAssetModels) { var vsGraphModel = (VSGraphModel)graphAssetModel.GraphModel; var translator = vsGraphModel.CreateTranslator(); if (!translator.SupportsCompilation()) { continue; } if (vsGraphModel) { vsGraphModel.Compile(AssemblyType.Source, translator, CompilationOptions.Default | CompilationOptions.LiveEditing); } } if (roslynCompilationOnBuildFinished != null) { BuildFinished += roslynCompilationOnBuildFinished; } BuildVisualScriptingAssemblyFromAllSourceFiles(ModelUtility.GetAssemblyOutputDirectory()); }