
Using Signal Emitters to Access C# Scripts
If you are working on an in-game cinematic shot, and want to trigger a script from a Timeline in your Unity project, you can come to the right place.
Signal Emitters are a great way to call a function on a script from a timeline, at at a designated point in time. Let’s get going on making this work!
The Drone object has a simple script called Drone Explosion, that holds an assignment for an explosion Prefab. This particle explosion comes from GameDevHQ’s Filebase asset library.

The script is simple, and will instantiate the explosion prefab at the position and location of the object it is attached to.

If you are looking to instantiate explosions through Timeline, I would highly suggest using an Activation Track instead of f this method. I am just doing this as an example for script communication via Timeline.
I have two drones and two timelines in this scene, but I will use Drone_02 and Timeline_02 as an example.

The drone object is added to an Activation Track so that it can turn off visually when the explosion occurs.

The Push Pin Icon will drop down an option for Markers when pressed.

Right-click in the Markers area in the timeline to bring up additional options. Select the Add Signal Emitter option. A small Icon with a warning symbol appears. Select it and check out the Inspector.

Both of the Create Signal and Add Signal Receiver buttons need to be pressed.

When prompted after pressing Create Signal, make a Signals folder in your Assets folder to keep the project organized.

The new Signal and it’s corresponding meta data are saved.

The signal marker can be dragged around the timeline and placed wherever you want it to trigger.

After pressing the Add Signal Receiver button, the Signal Receiver component is added to the object holding my Director. By default, that same object is assigned to monitor the Signal.

The drone object has the script on it, so let’s Drag the drone into the assignment box to replace the Timeline assignment.

Now the Function Drop-Down will show the DroneExplosion script, and the public Explosion method can be triggered.

When the Timeline hits the Marker, the Signal Emitter pings the script and the explosion prefab is instantiated. While this is a simple example, I am sure you can imagine the different scenarios where communicating with scripts could come in really handy during cinematic cuts. Thanks for reading!
