Ends Today: Save up to 95% on the Time Travel Mega Bundle!

Publish Subscribe to Events

Overview

If you prefer working with events and being able to subscribe multiple handlers to the same event, this plugin is for you.

You have the ability to attach as many parameters to an event so that subscribers can process the event. However all parameters attached to an event are strings, so you may have to convert to and from strings to work with the data.

How to use from Event Sheets

Create Event

  1. Action - Create Event and specify an event name
  2. Action - Add parameter to include data in the event as a string
  3. Repeat the above step to include as many parameters as desired
  4. Action - Publish Event

Handle Event

  1. Condition - Create a condition to subscribe to the named event
  2. Condition - Can create subscribe conditions in multiple event sheets (Event sheets must be included for conditions to be processed)
  3. Expression - Use the get event parameter expression to access the data included in the published event to process (Parameters are referenced by the zero index, so the first item will be 0)

How to use through the Scripting Interface and Event Sheets

Create Event

Can be accessed in scripts like:

  • const pub = runtime.objects.PubSub.getFirstInstance();
  • pub.CreateEvent('test');
  • pub.AddEventParameter('item1');
  • pub.AddEventParameter('item2');
  • pub.PublishEvent();

Subscribe to events in the event sheet.

  • Follow the instructions above to subscribe to an event in the Event Sheet
6.28 
UE Versions 1.0.0.2
Release date 11.07.2024

Similar products

Image
Sign In
Image
Sign Up
Image
Recovery