# Getting Started

1. To get started, go to **Tools -> UHFPS -> Setup -> Add HEROPLAYER.** This will add the **GAMEMANAGER** and **HEROPLAYER** objects to the scene.

<figure><img src="https://2665493337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fh8bp6Jx5qkS4c0NEaWR1%2Fuploads%2F3yLk5jhESx91YcNUJPYe%2Fsetup.png?alt=media&#x26;token=50404573-17fe-423b-9209-6f35ea5488c9" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2665493337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fh8bp6Jx5qkS4c0NEaWR1%2Fuploads%2FkVwtw4sWRpJrsYFv8HdE%2Fscene.png?alt=media&#x26;token=38947cfc-31a7-472e-800c-6ac472639518" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
If you remove **HEROPLAYER** or **GAMEMANAGER** from the scene or lose some references between the Player and the Game Manager, you can select the <mark style="color:yellow;">**Fix Missing**</mark> option to fix the setup.

If you have made any changes to the **Player** or **Game Manager** and want to reload **HEROPLAYER** or **GAMEMANAGER** to a new one, select <mark style="color:yellow;">**Reload Setup**</mark>. Be aware that this will require you to re-set any level-specific scriptables or saveables.
{% endhint %}

{% hint style="danger" %}
The player's rotation must always be zero. When you rotate the player to face a specific direction, the rotation is automatically transferred to the camera's look rotation, and the player's rotation is reset to zero.
{% endhint %}

When you lose the reference between the game manager and the player, you can reassign them by following this guide:

{% content-ref url="getting-started/references" %}
[references](https://docs.twgamesdev.com/uhfps/getting-started/references)
{% endcontent-ref %}

2. In the **GAMEMANAGER**, navigate to **Player Presence Manager** and select **Player Unlock Type** to specify whether you prefer **Automatic** or **Manual** unlocking of the player.

<figure><img src="https://2665493337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fh8bp6Jx5qkS4c0NEaWR1%2Fuploads%2Fcomh1gjkpZGOZKSilTL1%2FScreenshot_6.png?alt=media&#x26;token=9d33baaa-88c6-45e5-873e-a150222e068c" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
With the **Player Unlock Type** set to **Automatically**, the player will be unlocked either at the beginning of the game or when loading a saved game.
{% endhint %}

{% hint style="info" %}
When the **Player Unlock Type** is set to **Manually**, you need to invoke **`PlayerPresenceManager.UnlockPlayer()`** in order to unlock the player or **`PlayerPresenceManager.FadeBackground()`** to fade out the background through your custom script. This option is useful for playing cutscenes or performing other actions before fully engaging in the game.
{% endhint %}

Here's how you can unlock the player manually:

```csharp
using UHFPS.Runtime;

void Start()
{
    // fade out the background and unlock the player
    PlayerPresenceManager.Instance.UnlockPlayer();
    
    // or
    
    // fade out the background
    PlayerPresenceManager.Instance.FadeBackground(true, 
        () => { /* custom actions after fade */ });
}
```
