Documentation #

In order for the example scenes to work, you must first import the databases for the examples.
You need a uSignal and a uBundle Database.
You can create both databases from the uSignal menu if necessary.
Then select the uBundle Database Asset and click on „Import Example Files“.
Importing will alway overwrite your databases.
This will create all uSignals and uBundles for the example scenes.

1.0 Working with uSignals #

1.1 uSignal Database #

The database is an asset file in your Resources folder. It is a list divided into categories where the uSignals are assigned.

You can easily edit the list without the editor if you want. I recommend using the editor anyway to avoid errors.

Image module

1.2 Create uSignal Database #

Image module

To create a uSignal Asset, I recommend you to use the uSignal Database. This database is designed for fast working. You can find it under the menu item uSignal->uSignal Database. A uSignal Database is an asset that is stored in your project.
All assets of uSignal are stored in the Resources folder. The database creates the complete folder structure for you. Always make sure that the category Folder and Database are in the same directory. The uSignals are stored in the respective category folders.

Image module

1.3 Categorys #

Image module
Add a Category

Use the New Categorys text box to create a new category. Type in the name and press Enter to confirm. This will create a folder in the uSignal Resources.

Remove a Category

You can delete the category by clicking Delete Category Button.

Rename a Category

To rename a category, click in the orange text field with the name of the category and type in the name and confirm with Enter.

1.4 uSignal Asset #

uSignals are stored as assets in your project. They are basically the storage space for all events. You can add a comment to the uSignal. The other options are only available in play mode and are covered in the Debug chapter.

Image module
Add a uSignal

To create a uSignal, click New Signal. This creates an asset in a folder in your project directory. With Select Signal you can select the newly created asset.

Remove a uSignal

To delete a uSignal click on Delete Signal.

Rename a uSignal

You can rename uSignals by entering the name in the text field and confirm with Enter.

Select a uSignal from Database

You can use the Select Signal button to select a u signal in the Project View. This saves you having to search.

Search a uSignal in Database

If you have many signals you can use the text box Search Signal to filter the signals by name. All categories will be searched.

Comment a uSignal

You can write a comment for the signal, for example to indicate its use. You can create a comment by selecting the uSignal asset. Comments are also displayed in the uSignal Database.

Image module

When you select a uSignal, you see the properties of the asset.
As long as they are not in play mode, the other properties will be grayed out.
The Listeners section lists all listeners that have registered with this signal. You can select them in Play mode.
You can also test a signal without code in play mode. This is very handy if you want to know quickly if your logic works.
For example, you don’t have to run to an opponent every time to harm the player. Just test the logic using the uSignal directly. This will save you a lot of development time.
If you turn on Debug to Console, you will get additional information in the console.

02 uSignal Listener #

The uSignal listeners are components in the scene that wait for the events of the signals.

As soon as a uSignal is raised, the listeners perform their assigned task.

Image module
Comment a Listener

Wie auch bei den uSignals können Sie zu der Listener Komponente ein Kommentar schreiben, um seine Aufgabe zu beschreiben.

Select a uSignal to listen

You can either assign a uSignal via drag & drop or select it directly from the database.

Select a Listener

You can assign scripts to the uSignal Listener like you are used to with Unity Events.
If you want to pass a dynamic parameter to a method, select the respective parameter field in the popup. If you want to pass dynamic parameters, make sure that you select the dynamic method when selecting the method.

Image module

03 Raising uSignals #

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.

Image module

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);
 
    }
 
}

04 uSignal Scene Lister #

With the uSignal Scene Listener you have an overview of all listeners in your current scene.

This is very helpful when debugging and updates itself when you add or delete listeners.

It shows you relevant data like the names and the listener type.

You can also directly select the listener or the assigned uSignal.

It is also possible to filter the listeners via the Search Textbox.

Image module

05 Working with uBundles #

What is a uBundle?

Sometimes it happens that you have to execute the same events over and over again. uBundles are a collection of uSignals and these can be managed via the uBundle database. uBundles raises all your assigned uSignals at once.

Image module
Raising a uBundle

You can call uBundle just like uSignals by code.

using uSignals;
 
  public class uSignalExample : MonoBehaviour {
 
    public uSignal OnGameStart;
 
    void Start() {
       OnGameStart.Raise();
    }
}

06 Debugging uSignals #

You have several possibilities to debug your uSignals and uBundles. In play mode you can raise your them at any time.

uDebug

The udebug window shows you all called usignals.

Image module
Raise in PlayMode

To raise in play mode simple enter the unity play mode and select your uSignal or uBundle. Then select the uSignal or uBundle you want to raise. Then you can simply raise the signal with or without a parameter.

Image module

07 Import Export #

Currently under Development.

Please check the Tutorial Videos for Import / Export