chore(unity): 固定Unity CLI Loop本地包并移除UnitySkills依赖

This commit is contained in:
Liubing\LB
2026-09-28 18:14:59 +08:00
parent 0eb43b2b40
commit c4ae02def9
952 changed files with 70137 additions and 11 deletions

View File

@@ -0,0 +1,59 @@
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using UnityEditor.Compilation;
namespace io.github.hatayama.uLoopMCP
{
internal sealed class DynamicCompilationBackendResult
{
public CompilerMessage[] CompilerMessages { get; }
public DynamicCompilationBackendKind BackendKind { get; }
public DynamicCompilationBackendResult(
CompilerMessage[] compilerMessages,
DynamicCompilationBackendKind backendKind)
{
CompilerMessages = compilerMessages;
BackendKind = backendKind;
}
}
internal sealed class DynamicCompilationBackend
{
public Task<DynamicCompilationBackendResult> CompileAsync(
string sourcePath,
string dllPath,
List<string> references,
ExternalCompilerPaths externalCompilerPaths,
CancellationToken ct,
Action markBuildStarted,
Action markBuildFinished,
Action incrementBuildCount)
{
if (externalCompilerPaths != null)
{
return RoslynCompilerBackend.CompileAsync(
sourcePath,
dllPath,
references,
externalCompilerPaths,
ct,
markBuildStarted,
markBuildFinished,
incrementBuildCount);
}
return AssemblyBuilderFallbackCompilerBackend.CompileAsync(
sourcePath,
dllPath,
references,
ct,
markBuildStarted,
markBuildFinished,
incrementBuildCount);
}
}
}