feat: add opt-in MonoBehaviour lifecycle weaving
Publish UPM package / publish (push) Successful in 2s
Publish UPM package / publish (push) Successful in 2s
This commit is contained in:
@@ -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)]
|
||||
|
||||
Reference in New Issue
Block a user