Astra Unity 2.6.6
Astra Unity Plugin
Astra.Utils.EventBus.Subscription< TBusEvent, TSubscriber > Class Template Reference

A class representing the association between event, subscriber, and subscriber callback method to invoke on event publication Implements the ISubscription interface More...

Inheritance diagram for Astra.Utils.EventBus.Subscription< TBusEvent, TSubscriber >:

Public Member Functions

 Subscription (Action< TBusEvent > action, TSubscriber subscriber)
 Subscription constructor More...
 
void Publish (BusEvent busEvent)
 Called by the outer Publish method. Invokes the subscriber callback method associated with this event More...
 
UnityEngine.Object GetSubscriber ()
 Returns the subscriber object More...
 

Detailed Description

A class representing the association between event, subscriber, and subscriber callback method to invoke on event publication Implements the ISubscription interface

Template Parameters
TBusEventType of event to which a subscriber is associated
TSubscriberType of subscriber
Type Constraints
TBusEvent :BusEvent 
TSubscriber :UnityEngine.Object 

Constructor & Destructor Documentation

◆ Subscription()

Astra.Utils.EventBus.Subscription< TBusEvent, TSubscriber >.Subscription ( Action< TBusEvent >  action,
TSubscriber  subscriber 
)
inline

Subscription constructor

Parameters
actionCallback to be invoked on publication of given event
subscriberA reference to the subscribing Object

Member Function Documentation

◆ GetSubscriber()

UnityEngine.Object Astra.Utils.EventBus.Subscription< TBusEvent, TSubscriber >.GetSubscriber ( )
inline

Returns the subscriber object

Returns
Subscriber Object

Implements Astra.Utils.EventBus.ISubscription.

◆ Publish()

void Astra.Utils.EventBus.Subscription< TBusEvent, TSubscriber >.Publish ( BusEvent  busEvent)
inline

Called by the outer Publish method. Invokes the subscriber callback method associated with this event

Implements Astra.Utils.EventBus.ISubscription.


The documentation for this class was generated from the following file: