From 8ffa1ca5448ebffe53e0fbebf437df5d15e96568 Mon Sep 17 00:00:00 2001 From: Merlin <36685500+Merlin-san@users.noreply.github.com> Date: Tue, 7 Apr 2020 16:24:50 -0700 Subject: [PATCH] Fix error when compiling all programs with an unassigned script asset - Fix error thrown when compiling all programs and there is an UdonSharpProgram asset with no script assigned in the project. --- Assets/UdonSharp/Editor/UdonSharpCompiler.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/UdonSharp/Editor/UdonSharpCompiler.cs b/Assets/UdonSharp/Editor/UdonSharpCompiler.cs index 816c0cad..f99cf3d4 100644 --- a/Assets/UdonSharp/Editor/UdonSharpCompiler.cs +++ b/Assets/UdonSharp/Editor/UdonSharpCompiler.cs @@ -29,7 +29,7 @@ public UdonSharpCompiler(UdonSharpProgramAsset programAsset) public UdonSharpCompiler(UdonSharpProgramAsset[] programAssets) { - modules = programAssets.Select(e => new CompilationModule(e)).ToArray(); + modules = programAssets.Where(e => e.sourceCsScript != null).Select(e => new CompilationModule(e)).ToArray(); } public void Compile()