コード例 #1
0
 public static void DeleteUnusedAssemblies()
 {
     EditorCompilationInterface.EmitExceptionAsError(delegate
     {
         EditorCompilationInterface.Instance.DeleteUnusedAssemblies();
     });
 }
コード例 #2
0
 public static void SetAllPackageAssemblies(EditorCompilation.PackageAssembly[] packageAssemblies)
 {
     EditorCompilationInterface.EmitExceptionAsError(delegate
     {
         EditorCompilationInterface.Instance.SetAllPackageAssemblies(packageAssemblies);
     });
 }
コード例 #3
0
 public static void SetAllCustomScriptAssemblyJsons(string[] allAssemblyJsons)
 {
     EditorCompilationInterface.EmitExceptionAsError(delegate
     {
         EditorCompilationInterface.Instance.SetAllCustomScriptAssemblyJsons(allAssemblyJsons);
     });
 }
コード例 #4
0
 private static void EmitExceptionAsError(Action action)
 {
     try
     {
         action();
     }
     catch (Exception exception)
     {
         EditorCompilationInterface.LogException(exception);
     }
 }
コード例 #5
0
        private static T EmitExceptionAsError <T>(Func <T> func, T returnValue)
        {
            T result;

            try
            {
                result = func();
            }
            catch (Exception exception)
            {
                EditorCompilationInterface.LogException(exception);
                result = returnValue;
            }
            return(result);
        }
コード例 #6
0
 public static EditorCompilation.CompileStatus TickCompilationPipeline(EditorScriptCompilationOptions options, BuildTargetGroup platformGroup, BuildTarget platform)
 {
     return(EditorCompilationInterface.EmitExceptionAsError <EditorCompilation.CompileStatus>(() => EditorCompilationInterface.Instance.TickCompilationPipeline(options, platformGroup, platform), EditorCompilation.CompileStatus.Idle));
 }
コード例 #7
0
 public static bool CompileScripts(EditorScriptCompilationOptions definesOptions, BuildTargetGroup platformGroup, BuildTarget platform)
 {
     return(EditorCompilationInterface.EmitExceptionAsError <bool>(() => EditorCompilationInterface.Instance.CompileScripts(definesOptions, platformGroup, platform), false));
 }
コード例 #8
0
 public static EditorCompilation.TargetAssemblyInfo[] GetAllCompiledAndResolvedCustomTargetAssemblies()
 {
     return(EditorCompilationInterface.EmitExceptionAsError <EditorCompilation.TargetAssemblyInfo[]>(() => EditorCompilationInterface.Instance.GetAllCompiledAndResolvedCustomTargetAssemblies(), new EditorCompilation.TargetAssemblyInfo[0]));
 }
コード例 #9
0
 public static string GetCompileScriptsOutputDirectory()
 {
     return(EditorCompilationInterface.EmitExceptionAsError <string>(() => EditorCompilationInterface.Instance.GetCompileScriptsOutputDirectory(), string.Empty));
 }