feat: make Unity integration optional

This commit is contained in:
cneicy committed 2026-10-03 23:36:43 +08:00
1 parent a92c9d2cea
commit 240d24ba7a
27 files changed
+916 -69

No files matched your search

+6 -2
View File
@@ -6,7 +6,11 @@ using System.Diagnostics;
using System.Threading;
using System.Threading.Tasks;
using Cysharp.Threading.Tasks;
using ShrinkSDK.Runtime;
#if UNITY_5_3_OR_NEWER
using MainThreadDispatcherContract = ShrinkEventBus.IShrinkEventBusMainThreadDispatcher;
#else
using MainThreadDispatcherContract = ShrinkSDK.Runtime.IShrinkMainThreadDispatcher;
#endif
namespace ShrinkEventBus
{
@@ -208,7 +212,7 @@ namespace ShrinkEventBus
internal sealed class ShrinkMainThreadScheduler : IShrinkBusScheduler
{
private readonly ShrinkSchedulerQueue _queue;
private readonly IShrinkMainThreadDispatcher _dispatcher;
private readonly MainThreadDispatcherContract _dispatcher;
private int _pumpScheduled;
private int _disposed;