# UnrealLink

{% hint style="warning" %}
UnrealLink is under intense development, so this page might change in the future. Please contact us at <support@lightact.com> if you encounter any difficulties.
{% endhint %}

<figure><img src="https://3312042618-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9sVaJpWJhPbmscipukhh%2Fuploads%2Fgit-blob-f96325c1b1d8327fc9f8aa6a6e9d3762b3e62bee%2F240424-UnrealLinkWindow.png?alt=media" alt=""><figcaption></figcaption></figure>

*UnrealLink* is a window in *LightAct* where you can set up most of LightAct's integration with Unreal Engine. Once we set up the UE Editor path, we will describe every section of *UnrealLink* window one by one.

## UE Editor path

This is where you set up the path to **UE4Editor.exe** or **UE5Editor.exe**. You can edit this path under **Preferences -> UE**.

<figure><img src="https://3312042618-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9sVaJpWJhPbmscipukhh%2Fuploads%2Fgit-blob-cc45427c8c2bddcd1618edf8ee87631664960475%2F240424-Preferences.png?alt=media" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
Choosing the UEEditor path also determines which version of Unreal Engine LightAct is going to launch when launching .uproject Unreal assets.
{% endhint %}

## Sync

* **Send timecode to UE:** this enables or disables sending of LightAct's TC to Unreal.

### Genlock

* **Genlock Unreal Engine** determines whether you want to enable Genlocking of Unreal to LightAct and if yes, whether it should be to every LightAct's frame or every second, every third etc. In most cases, you'll want to enable Every frame.

{% hint style="info" %}
**Good to know:** If Unreal Engine cannot keep up with LightAct's framerate, you might want to lower LightAct's FPS in Project Settings.
{% endhint %}

* **Wait for UE texture:** this checkbox enables/disables LightAct's sub-frame latency feature.

## nDisplay Settings

<figure><img src="https://3312042618-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9sVaJpWJhPbmscipukhh%2Fuploads%2Fgit-blob-a58728b7d39622bc70c19217096ac494480efbef%2F240424-nDisplaySettings.png?alt=media" alt=""><figcaption></figcaption></figure>

LightAct's management of nDisplay follows these steps:

1. import some Unreal Assets,
2. create an .ndisplay configuration file,
3. generate launch command,
4. launch nDisplay,
5. kill nDisplay (optional).

### Importing Unreal Assets

To use UnrealLink you need at least one Unreal asset. Unreal asset can be either an executable of a packaged game or, more commonly, a .uproject file of Unreal Engine project.

<figure><img src="https://3312042618-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9sVaJpWJhPbmscipukhh%2Fuploads%2Fgit-blob-dae2585bd4649cddb93db4228dbde69e58768b6f%2FImportingUnrealAssets.gif?alt=media" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
To import an Unreal Asset, simply drag **.exe** or **.uproject** file into LightAct's window.
{% endhint %}

Once you've imported them, they will appear as radio buttons in UnrealLink window. Select one of them before proceeding.

### Creating a .nDisplay configuration file

#### nDisplay Throwers or Projectors

<figure><img src="https://3312042618-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9sVaJpWJhPbmscipukhh%2Fuploads%2Fgit-blob-7e029c28efbef1056a5565ffa96221329568d0b5%2F240424-nDisplayCheckbox%20.png?alt=media" alt=""><figcaption></figcaption></figure>

To create an .ndisplay config file you need to have at least one *Thrower* or *Project* in the Viewport which has nDisplay checkbox enabled. This means it will get used as a template for nDisplay viewport.

#### Creating .ndisplay file

<div align="left"><img src="https://3312042618-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9sVaJpWJhPbmscipukhh%2Fuploads%2Fgit-blob-0b2920f11f16eaae46d42aa6fea93f8f771027b3%2Fimage.png?alt=media" alt=""></div>

Click on **... button** and select or create an .ndisplay file.

{% hint style="info" %}
Don't forget to click on **Generate config file** button in order to generate it.
{% endhint %}

### Launching nDisplay

<div align="center"><img src="https://3312042618-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9sVaJpWJhPbmscipukhh%2Fuploads%2Fgit-blob-1d640cbc3db9a052291b2a0727972cb0ab2089c5%2Fimage.png?alt=media" alt=""></div>

The simple way to launch nDisplay is to click on **Generate command** button.

After this, the command will appear in the textbox below.

Then, you can click on **Launch nDisplay** button.

<div align="center"><img src="https://3312042618-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9sVaJpWJhPbmscipukhh%2Fuploads%2Fgit-blob-080c7630bed34c2eba88684b30b6d43b5708fbe4%2Fimage.png?alt=media" alt=""></div>

If you have enabled **Every frame** in the **Lock UE to** dropdown, then a few seconds after you've clicked on *Launch nDisplay* button, you will see **real-time stats** of Unreal Engine instance.

{% hint style="warning" %}
The stats won't appear if you haven't installed, enabled and set up LightAct plugin correctly.
{% endhint %}

#### Additional arguments and console commands

​

<figure><img src="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9sVaJpWJhPbmscipukhh%2Fuploads%2Fj7DGjVpTm1ZsoeJlyNKA%2Fimage.png?alt=media&#x26;token=d1bbf80a-41d9-4154-aacf-e5c0e828e122" alt=""><figcaption></figcaption></figure>

​There are 2 textboxes above the **Generate command** button:

* **Exec cmd line Args:** this adds additional command line arguments to the launch command. For example, if you add *-trace* , Unreal Engine instance will immediately try to connect to UnrealInsights tool.
* **Custom ExecCmds:** this passes additional console commands

#### Advanced settings

<div align="center"><img src="https://3312042618-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9sVaJpWJhPbmscipukhh%2Fuploads%2Fgit-blob-fd01acf059f3f00347c711c629b373dd29edaab9%2Fimage.png?alt=media" alt=""></div>

If you enable **Show advanced settings**, you can adjust additional settings of your nDisplay instance. A lot of these are taken from Unreal's default settings, so we won't describe them in detail here.

{% hint style="info" %}
More information on Unreal's nDisplay can be found in [Unreal's User Documentation](https://docs.unrealengine.com/5.0/en-US/).
{% endhint %}

However, the ones we should explain in a bit more detail are:

* **Render offscreen**: this prevents Unreal to create windows and instead renders the content off screen.
* **Enable mGPU:** enable this if you use multiple GPUs and want some or all of the nDisplay viewports to render on a different GPU than the one LightAct is rendering on.

There are 2 textboxes above the **Generate command** button where you can add additional command line arguments or Custom ExecCmds. See Unreal's user docs for more information.

{% hint style="warning" %}
You need an NVidia card with NVLink to enable multiple GPU rendering with Unreal Engine.
{% endhint %}

### Killing nDisplay

To kill an nDisplay instance, just press **Kill nDisplay** button.

{% hint style="warning" %}
nDisplay instances that were launched by LightAct are also killed when you exit LightAct
{% endhint %}
