# Getting Started

**Universal Build System** can be setup in just a few simple steps. Add **UBS\_Component** to your **PlayerController** and add **UBS\_Interface** to your **PlayerController** and **GameInstance**, then setup the two interface functions. You then setup all your building objects in **DT\_HISM**, but it is recommended that you duplicate this data table so future updates do not overwrite your work.

<figure><img src="https://1839238237-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWjU7bSayXkXSDn5yzIdC%2Fuploads%2FyGtmpPwr46KnMYFt2VFT%2Fimage.png?alt=media&#x26;token=7eaf8ca6-243d-4f9f-ac24-cf94a30109a9" alt=""><figcaption><p>Add UBS_Component to your PlayerController.</p></figcaption></figure>

<figure><img src="https://1839238237-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWjU7bSayXkXSDn5yzIdC%2Fuploads%2FD8ypiVuH3NhkfVluDKqN%2Fimage.png?alt=media&#x26;token=d598fedd-bef1-4502-bea1-883eb926e0a6" alt=""><figcaption><p>Add UBS_Interface to your PlayerController.</p></figcaption></figure>

<figure><img src="https://1839238237-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWjU7bSayXkXSDn5yzIdC%2Fuploads%2Fpv13jliW229XAQ1fj7qe%2Fimage.png?alt=media&#x26;token=dc8c2c84-34b0-4591-9656-8cb200bdb502" alt=""><figcaption><p>Setup the GetInteractionHit interface function in your PlayerController.</p></figcaption></figure>

You will need to determine how you get your interaction hit and store it in a variable so that **UBS** can use it. The example above shows the variable I created for testing purposes. The example below shows how I am getting interaction hits.

<figure><img src="https://1839238237-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWjU7bSayXkXSDn5yzIdC%2Fuploads%2F09vM92FbxusTM2ZC9FRX%2Fimage.png?alt=media&#x26;token=b69412e4-0ac3-49d1-845d-592980cf60ad" alt=""><figcaption><p>I use a line trace to determine what is currently being interacted.</p></figcaption></figure>

In the example above, **GetTracePath** is a custom function I created to return the current location of the player camera and the end location of the interaction trace based on the current forward vector of the player camera and the specified length, 1000 in the example.

<figure><img src="https://1839238237-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWjU7bSayXkXSDn5yzIdC%2Fuploads%2FJVAB3TVPpYEADQgcyuAq%2Fimage.png?alt=media&#x26;token=06185fa8-0e08-4aae-89ff-1e2ea7ebc427" alt=""><figcaption><p>Setup your input in your PlayerController.</p></figcaption></figure>

In the example above, I am simply using left mouse button to determine which **UBS** function to run. There are multiple input examples in the **UBS\_Controller** blueprint. Use these examples as references.

<figure><img src="https://1839238237-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWjU7bSayXkXSDn5yzIdC%2Fuploads%2FQDJDuI93WvkSDfLUlcWp%2Fimage.png?alt=media&#x26;token=c532c79a-4282-4893-8ea6-0a3cfd458016" alt=""><figcaption><p>Add UBS_Interface to your GameInstance.</p></figcaption></figure>

<figure><img src="https://1839238237-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWjU7bSayXkXSDn5yzIdC%2Fuploads%2Fc3tFM5CPV6BoyxKGXtJE%2Fimage.png?alt=media&#x26;token=3b6a3820-e822-44f5-aa26-44f4f81910a6" alt=""><figcaption><p>Setup the GetSaveGameSlot interface function in your GameInstance.</p></figcaption></figure>

In the example above, I am simply hard-coding the slot name, but you would most likely have a variable that stores your current save game slot name. You will want this interface function to return that variable.

<figure><img src="https://1839238237-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWjU7bSayXkXSDn5yzIdC%2Fuploads%2FWSrae7vASSgFU85f7SBq%2Fimage.png?alt=media&#x26;token=5b15556f-e380-4929-a9d3-5853be8ba5dd" alt=""><figcaption><p>Setup your building objects.</p></figcaption></figure>

Shown above is all the information of a single building object. You will be doing majority of your work in the data table. No need to create hundreds of individual actors, as you will instead store them all in a single data table. The next section will go over everything you need to know about the data table.
