chore: initialize standalone UPM package
Publish UPM package / publish (push) Failing after 1s

This commit is contained in:
2026-08-26 02:50:18 +08:00
commit 1c921f5aec
86 changed files with 6934 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
#nullable enable
using System;
namespace ShrinkEventBus
{
public sealed class ShrinkEventBusBuilder
{
internal ShrinkBusKey Key { get; private set; } = ShrinkBusKey.Game;
internal ShrinkBusOptions Options { get; private set; } = ShrinkBusOptions.Inline();
internal Action<IShrinkEvent, Type, ShrinkBusKey>? PostObserver { get; private set; }
public ShrinkEventBusBuilder WithKey(ShrinkBusKey key)
{
Key = key;
return this;
}
public ShrinkEventBusBuilder WithOptions(ShrinkBusOptions options)
{
Options = (options ?? throw new ArgumentNullException(nameof(options))).CloneValidated();
return this;
}
public IShrinkEventBus Build() => Options.Scheduler == ShrinkBusSchedulerKind.Inline
? new ShrinkInlineEventBusInstance(this)
: new ShrinkEventBusInstance(this);
internal ShrinkEventBusBuilder WithPostObserver(
Action<IShrinkEvent, Type, ShrinkBusKey> observer)
{
PostObserver = observer ?? throw new ArgumentNullException(nameof(observer));
return this;
}
}
}