Using Signal Emitters to Access C# Scripts

Suleiman Abdullah
2 min readJan 12, 2023

--

Objective: Using Signal Emitters to Access C# Scripts.

Before doing this let's understand the architecture of a Signal emitter, it consists of a signal emitter, signal receiver, and Signal Asset.

In the first step, I will prepare a simple scene, of a couple of cubes with the timeline. Then I will animate the first cube.

Now we need to create a signal emitter, but since this object doesn't have any component in the timeline we need to create a component called signal track, then drag this object in the timeline.

Note: By doing this object will create a signal receiver on this object, remove it since it required the signal receiver to be on the timeline.

Note: It is not necessary to have a signal track in order to create a signal emitter.

Remove the Signal Receiver from here

Now click the pin on the timeline then right-click on the model of the timeline and choose Add Signal Emitter. Clicking the pin button is not necessary just it gives us space to see well.

Select Signal Emitter<Inspector, you need to set emit signal by dropping down this option and choosing the signal asset we create then click the button “Add Reaction” then take a game object which has a script and drag it to the receiver option. Here I will choose the Class of the script and method to link this object with the signal emitter.

Let's see the result.

Signal Emitor is useful in many scenarios, one to disable control when cutscene play and more, See you in the next article.

--

--

Suleiman Abdullah
Suleiman Abdullah

Written by Suleiman Abdullah

Self taught Unity Developer, who is passion about making games ,and he loves Math For Game Development

No responses yet