Class EventReceiver<T>
Creates an event receiver that is used to receive T type events from an EventKey
public sealed class EventReceiver<T> : EventReceiverBase<T>, IDisposable
  Type Parameters
TThe type of data the EventKey will send
- Inheritance
 - 
      objectEventReceiver<T>
 
- Implements
 
- Inherited Members
 
- Extension Methods
 
Constructors
EventReceiver(EventKey<T>, EventReceiverOptions)
Creates an event receiver, ready to receive broadcasts from the key
public EventReceiver(EventKey<T> key, EventReceiverOptions options = EventReceiverOptions.None)
  Parameters
keyEventKey<T>The event key to listen from
optionsEventReceiverOptionsOption flags
Methods
ReceiveAsync()
Awaits a single event
public Task<T> ReceiveAsync()
  Returns
- Task<T>
 
TryReceive(out T)
Receives one event from the buffer, useful specially in Sync scripts
public bool TryReceive(out T data)
  Parameters
dataT
Returns
TryReceiveAll(ICollection<T>)
Receives all the events from the queue (if buffered was true during creations), useful mostly only in Sync scripts
public int TryReceiveAll(ICollection<T> collection)
  Parameters
collectionICollection<T>