# Detailed Setup

{% embed url="<https://youtu.be/ACRU8Vx4BcI>" %}

### Information on setting up a Note

{% content-ref url="note-scriptable-setup" %}
[note-scriptable-setup](https://speedtutoruk.gitbook.io/letter-and-note-system-doc/getting-started/note-scriptable-setup)
{% endcontent-ref %}

### Quick Setup

{% hint style="warning" %}
**NOTE:** You can get a quick start using the **Entire\_DemoScene\_Prefab** object and drag that straight into your scene. This will everyone to be already setup, you can delete the art assets as required but checkout the demo scene if you’re confused!
{% endhint %}

### Inventory Usage

{% hint style="warning" %}
The system can work without the **NoteInventory** if you're not adding notes to inventory after first interacting
{% endhint %}

### Setting up a Player

{% hint style="info" %}
I would recommend using the **NoteScene** demo scene from the package as a start to your main project but if not we’ll go through the basic setup, please refer to that scene it you’re ever stuck for the way it is setup
{% endhint %}

* Add the **FPSController** from the **Prefabs** folder to the Hierarchy or scene. (If not already available, if you're using the prefab)

{% hint style="warning" %}
Make sure your character controller (If it has a collider) has the layer of **Ignore Raycast&#x20;*****(***&#x54;his will stop the Raycast being interrupted when looking at lower objects)
{% endhint %}

* On your M**ain Camera:** Make sure you have the **NotesInteractor** script added
  * You can set the Ray Length to the distance you wish to detect the note from

<figure><img src="https://1449555691-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MX90W55rg_0Apo6Wjmz%2Fuploads%2F84yoVgyUnzWdI2bUQgyd%2FNoteInteractor-Raycast.JPG?alt=media&#x26;token=ef4ba62a-da2f-4e65-9819-1151c022e6db" alt=""><figcaption></figcaption></figure>

### Managers Setup

* Now add a (from the “**Prefabs > Managers**” folder to your Hierarchy or scene)&#x20;
  * **Disable Manager**
  * **Audio Manager**
  * **InputManager**
  * **NoteController**
  * **NoteUIManager**
  * **NoteInventory (If you're using this)**

<figure><img src="https://1449555691-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MX90W55rg_0Apo6Wjmz%2Fuploads%2FSIzwxKvwneRd2Z0o9Qq2%2FManagersV2.JPG?alt=media&#x26;token=55364ae1-b4a3-44f6-826d-c515827ce2f7" alt=""><figcaption></figcaption></figure>

### Disable Manager Setup

* On the **Disable Manager (**&#x4D;ake sure to add the inspector slots)
  * **Player**: **FPSController** object
  * **Note Interactor Script**: Add the **Main Camera** here (Or the object the **NotesInteractor** script is located)

<figure><img src="https://1449555691-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MX90W55rg_0Apo6Wjmz%2Fuploads%2F39fKTSJloD57THADqJoI%2FDisableManager.JPG?alt=media&#x26;token=5805a117-0c95-4d70-88bd-37b18b4924c7" alt=""><figcaption></figcaption></figure>

### Audio Manager Setup

* On the **Audio Manager -** Make sure you add your audio clip ScriptableObjects to the sounds array. (Get these from the ScriptableObjects > Sounds folder). More information about audio clips on the page below.

{% content-ref url="../support/adding-audioclips" %}
[adding-audioclips](https://speedtutoruk.gitbook.io/letter-and-note-system-doc/support/adding-audioclips)
{% endcontent-ref %}

<figure><img src="https://1449555691-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MX90W55rg_0Apo6Wjmz%2Fuploads%2FnPKF1deKZIa7QTjcmnsI%2FAudioManager.JPG?alt=media&#x26;token=c2b3f4b9-6a45-4e3b-b4a5-b4df12c26464" alt=""><figcaption></figcaption></figure>

### Input Manager Setup

On the **Input Manager** - Make sure to set the input buttons you'd like to use

<figure><img src="https://1449555691-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MX90W55rg_0Apo6Wjmz%2Fuploads%2FViimnrgdWfLZxnYSEQTv%2FInputManager.JPG?alt=media&#x26;token=ea5aa90c-cc3e-4500-9693-835914145dd5" alt=""><figcaption></figcaption></figure>

### Note Controller Setup

* The note controller doesn't need any setup, other than existing in the scene by adding the prefab

<figure><img src="https://1449555691-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MX90W55rg_0Apo6Wjmz%2Fuploads%2FlO1VrUTSZEAIWYaFEVvi%2FNoteControllerV2.JPG?alt=media&#x26;token=0c4964d3-6df7-496b-a94f-0d3ea4726c3c" alt=""><figcaption></figcaption></figure>

### Note Inventory Setup

* This doesn't need any setup other than existing in the scene by adding the prefab and this now includes a JSON save system which you can see on the page below if you need more information

{% content-ref url="json-save-system" %}
[json-save-system](https://speedtutoruk.gitbook.io/letter-and-note-system-doc/getting-started/json-save-system)
{% endcontent-ref %}

<figure><img src="https://1449555691-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MX90W55rg_0Apo6Wjmz%2Fuploads%2FchGUQFRIrW81hh99lHS1%2FNoteInventory.JPG?alt=media&#x26;token=4ea7ab03-b024-4591-9a96-9bac953e6d59" alt=""><figcaption></figcaption></figure>

### Adding Note Canvases&#x20;

* Add each canvas to control the notes, inventory, interact prompts, crosshair and note help (All can be found in the prefabs folder)

<figure><img src="https://1449555691-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MX90W55rg_0Apo6Wjmz%2Fuploads%2FApOsdYgQOBX32KsTTdsE%2FNoteCanvases.JPG?alt=media&#x26;token=44dd030d-5d8b-424d-8f4f-610fecf68b29" alt=""><figcaption></figcaption></figure>

### Note UI Manager Setup

* Add the **NoteUIManager** script or prefab to the scene so you can control all the cavnas and UI actions

{% hint style="info" %}
Note that some UI canvas elements use the CanvasGroup component because this allows us to keep the GameObjects active but show and hide panels within code, so we don't get as easily confused on what needs to be enabled or disabled at the start of the game.
{% endhint %}

<figure><img src="https://1449555691-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MX90W55rg_0Apo6Wjmz%2Fuploads%2FC8sTUI2MribN0K2k3hgc%2FNoteUIManager.JPG?alt=media&#x26;token=22702771-4709-4663-bd00-58b7d4889b47" alt=""><figcaption></figcaption></figure>

### Creating a Note or Letter

* Creating a Note or Letter in the scene requires your GameObjects to have:&#x20;
  * **Box Collider**
  * **NoteInteractable** script
    * Add the **NoteData** (ScriptableObject you've created for your note, see details below)

<figure><img src="https://1449555691-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MX90W55rg_0Apo6Wjmz%2Fuploads%2FnJBG5ikVX7P0wJEKVNFP%2FNoteInteractableV2.JPG?alt=media&#x26;token=e3e7762d-f875-4c9d-956e-288a8d7de91c" alt=""><figcaption></figcaption></figure>

### Creating NoteData SO

* Create a new ScriptableObject by duplicating the notes that already exist or by Right Clicking > Create > ScriptableObject > NoteData

<figure><img src="https://1449555691-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MX90W55rg_0Apo6Wjmz%2Fuploads%2FC22vPrQEGAq3J28FK4Dh%2FNoteData.JPG?alt=media&#x26;token=d1d25180-cc40-4d22-ab21-11e5502d41f5" alt=""><figcaption></figcaption></figure>

### Note Settings: Basic Note

* **Note ID:** This is the ID for the note to make sure it is unique, this is so the note is not duplicated in the inventory
* **Note Name:** This is the name of the note which will appear in the inventory
* **Note Icon:** This is the sprite used as the icon for the inventory
* **Add To Inventory:** This is a boolean to tick if you want to add the note to your inventory when first read

<figure><img src="https://1449555691-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MX90W55rg_0Apo6Wjmz%2Fuploads%2FwQytzYVhru6Cdgqc7zyk%2FBasicNoteSettings.JPG?alt=media&#x26;token=d9603be8-d128-4e61-9e66-869e4d4b2cc3" alt=""><figcaption></figcaption></figure>

### Note Settings: Main Note Visuals

* **Page Scale:** This is the scale of the note that is on the screen and this default value is usually 900x900
* **Page Images:** Here you can set the value to one and add a blank style sprite or set this to multiple if you have already created your note page in photoshop
* **Page Text:** This MUST have 1 in the size and have some text for basic usage of the note, even if you're not needing page text but you can incriment this to match the pages in the **Page Images**

<figure><img src="https://1449555691-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MX90W55rg_0Apo6Wjmz%2Fuploads%2FASwTUh9H9GDeUrEo1BxO%2FVisualsSettings.JPG?alt=media&#x26;token=8bdcd00a-1c35-4707-8b0a-4540f5718b62" alt=""><figcaption></figcaption></figure>

### Note Settings: Multiple Page Settings

* **Show Navigation Buttons:** Enable this checkbox if you have multiple pages and want to enable the buttons to navigation between them

<figure><img src="https://1449555691-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MX90W55rg_0Apo6Wjmz%2Fuploads%2FnQddtPSTIhjvaAJotruH%2FNavigationButton.JPG?alt=media&#x26;token=3fdb053f-2684-4582-a2fc-ac970aa68541" alt=""><figcaption></figcaption></figure>

### Note Settings: Main Note Text Customisation

* **Show Text On Main Page:** Enable this to allow text to be show on the note pages, if you have 1 single page image as above with a blank sprite
* **Main Text Area Scale:** This is the scale of the area that will show your text on the note, adjust this setting to position the text more to your liking.
* **Main Note Font Settings:** This is the size, font, style and colour of the text

<figure><img src="https://1449555691-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MX90W55rg_0Apo6Wjmz%2Fuploads%2FuvTGwFoK980AyNH40mej%2FMainNoteCustom.JPG?alt=media&#x26;token=8a4e5d46-5bc9-4b66-8a36-e6500a602346" alt=""><figcaption></figcaption></figure>

### Note Settings: Overlay Text Customisation

* **Enable Overlay Text:** Enable this to show the overlay option on the note
* **Show Overlay On Open:** Enable this to show the overlay as soon as you open the note
* **Overlay Text Area Scale:** This is the scale of the area the text will be added and can be adjusted if the text isn't fitting properly
* **Overlay Text BG Scale:** This is the background that the text will overlay over
* **Overlay BG Color:** The colour of the background, so you can see the text
* **Overlay Font Settings:** Size, font, style and text colour options in here

<figure><img src="https://1449555691-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MX90W55rg_0Apo6Wjmz%2Fuploads%2FYBK0UpwxZ0mkFKzvTunQ%2FOverlay.JPG?alt=media&#x26;token=af50d0e3-2e35-4d42-b795-c7ba40d0d5f9" alt=""><figcaption></figcaption></figure>

### Note Settings: Audio Playback

* **Allow Audio Playback:** This will enable the ability to play an audio clip with additional settings
* **Show Playback Buttons:** Enable this to show buttons for playing, pausing and resetting the audio&#x20;
* **Play on open:** This means the audio will play as soon as the note is opened
* **Note Read Audio:** The ScriptableObject from the SO folder can be added here
* **Note Page Audio** - Add the SO from the folder as above

{% hint style="info" %}
NOTE: The audio is programmed to STOP when you close the note, could be changed within code if you wish for another option. The two checkboxes, can be used together or independently
{% endhint %}

<figure><img src="https://1449555691-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MX90W55rg_0Apo6Wjmz%2Fuploads%2FGIBf3yY8pCEIu7d6hOV6%2FAudioSettings.JPG?alt=media&#x26;token=8d01853e-535d-4716-b19a-864928c814ff" alt=""><figcaption></figcaption></figure>

### Note Settings: Basic Trigger

* Is Note Trigger: Tick this if you're wanting to use the trigger event without the raycast
