There are several ways to raise a uSignal. Generally this is done via code, but since the system is very flexible, you can also raise it via Unity Events, another uSignal, and other types. I would like to introduce you to the methods using code.
uSignal has the helper class uSignalRaiser, which allows you to execute the call by name.
Without Arguments
Method 1
The first method references and executes the uSignal asset.
using uSignals; public class uSignalExample : MonoBehaviour { public uSignal OnGameStart; void Start() { OnGameStart.Raise(); } } |
Method 2
In the second method, the uSignal Asset is executed with the uSignalRaiser class via the category Name and uSignal Name.
using uSignals; public class uSignalExample : MonoBehaviour { void Start() { uSignalRaiser.RaiseSignal("General","OnGameStart"); } } |
Method 3
You also have the option of referencing the uSignal via the category Name and Signal Name and then executing it.
using uSignals; public class uSignalExample : MonoBehaviour { void Start() { uSignal signal = uSignalRaiser.GetSignal("General","OnGameStart"); signal.Raise(); } } |
With Arguments
To send arguments, you can overload the raise methods. The methods accept different base types. Make sure that the uSignal listeners wait for the respective type. For example, if you want to send the Int type, the listener must also be of the Int type.

You also have the option of referencing the uSignal via the category Name and Signal Name and then executing it.
using uSignals; public class uSignalExample : MonoBehaviour { public uSignal OnGameStart; void Start() { int anyInt = 100; OnGameStart.Raise(anyInt); } } |
Arguments can also be passed to the RaiseSignal method of the uSignalRaiser class.
using uSignals; public class uSignalExample : MonoBehaviour { public uSignal OnGameStart; void Start() { int anyInt = 100; uSignalRaiser.RaiseSignal("General", "OnGameStart", anyInt); } } |
Delay
If you want, you can give the u signal a delay. This is the third argument that the raising methods accept.
using uSignals; public class uSignalExample : MonoBehaviour { public uSignal OnGameStart; void Start() { int anyInt = 100; uSignalRaiser.RaiseSignal("General", "OnGameStart", anyInt, 5f); } } |
