chore(unity): 固定Unity CLI Loop本地包并移除UnitySkills依赖
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace io.github.hatayama.uLoopMCP
|
||||
{
|
||||
public static class DomainReloadStateRegistry
|
||||
{
|
||||
private static readonly object SyncRoot = new object();
|
||||
private static IDomainReloadStateProvider _provider;
|
||||
|
||||
public static void RegisterProvider(IDomainReloadStateProvider provider)
|
||||
{
|
||||
Debug.Assert(provider != null, "provider must not be null");
|
||||
|
||||
lock (SyncRoot)
|
||||
{
|
||||
_provider = provider;
|
||||
}
|
||||
}
|
||||
|
||||
public static bool IsDomainReloadInProgress()
|
||||
{
|
||||
IDomainReloadStateProvider provider;
|
||||
lock (SyncRoot)
|
||||
{
|
||||
provider = _provider;
|
||||
}
|
||||
|
||||
if (provider == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return provider.IsDomainReloadInProgress();
|
||||
}
|
||||
|
||||
public static IDomainReloadStateProvider SwapProviderForTests(IDomainReloadStateProvider provider)
|
||||
{
|
||||
lock (SyncRoot)
|
||||
{
|
||||
IDomainReloadStateProvider previousProvider = _provider;
|
||||
_provider = provider;
|
||||
return previousProvider;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user