Skip to main content

Receiver

Event Receivers allow you to receive execution from studio objects.

Create A Receiver

To create a receiver we need an object with an existing UnityEvent, for this example we will use a Button GameObject as it has an "OnClick" Event.

We are gonna add a new event to detect when a button has been pressed:

Drag the root GameObject prefab (the one with the rec room studio competent) and give it the event SendCircuitsEvent (string)

The string field is the name of your event

Go into the root prefab and click on Remake Object Boards For All Prefab Instances

RemakeObjectboard

Now hop ingame to test your Receiver! (Take a look at Testing Your Room for more info!)

In Game

When in game, find the UI with the object board attached to it

IngameEvent

Now when you press the button, the output exec port OnClick (your chosen event name) in the circuit board will run!