feat: add opt-in MonoBehaviour lifecycle weaving
Publish UPM package / publish (push) Successful in 2s

This commit is contained in:
2026-08-28 04:31:00 +08:00
parent cdd9dbdb73
commit a6011cd01d
6 changed files with 361 additions and 3 deletions
+7
View File
@@ -2,11 +2,18 @@ using System;
namespace ShrinkEventBus
{
public enum ShrinkSubscriberLifetime
{
Manual = 0,
AwakeToDestroy = 1
}
[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
public sealed class ShrinkEventSubscriberAttribute : Attribute
{
public string OwnerId { get; set; } = string.Empty;
public string DefaultBus { get; set; } = string.Empty;
public ShrinkSubscriberLifetime Lifetime { get; set; } = ShrinkSubscriberLifetime.Manual;
}
[AttributeUsage(AttributeTargets.Method, Inherited = false, AllowMultiple = false)]