# Quick Setup

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

{% hint style="warning" %}

#### This is a MAJOR UPDATE (NOT compatible with the previous versions)

{% endhint %}

{% hint style="info" %}

* Make sure to create tags called:
  * **InteractiveObject**
  * **ExaminePoint:** Tag for the **ExaminePoint** gameobject parented to the **ExamineCamera**
  * **InspectPoint:** Tag for every single inspect point that exists for an object
* Create Layers:&#x20;
  * User Layer 8: **ExamineLayer** (Doesn't need to be added to objects, referenced in code)
  * User Layer 9: **InspectPointLayer** (Tag for every single inspect point)
  * User Layer 10: **PostProcess**
  * User Layer 11: **PadlockSpinner**
    {% endhint %}

{% hint style="danger" %}
**LAYER NOTE:** If you can place these on the corresponding User Layers. It is easier for setup, as Unity will automatically place them in the correct places so the below information might not be all relevant to you. (It's worth checking through just in case)

* IF NOT added to these layers check the sections below on **Checking Prefabs (See side bar)** - Just to confirm all appropriate layers are added and no issues arise.&#x20;
  {% endhint %}

{% hint style="success" %}
Open APK help window for easy links and advice: **Window** > **Adventure Kit Support**
{% endhint %}

### Installation:&#x20;

* Download or update assets from the package manager

{% hint style="warning" %}
**Importing Tips:**

1. Import into a fresh project rather than a working project, to avoid issues
2. Always keep a backup of your working project **BEFORE** importing **ANY** assets
3. In the **Import Unity Package** dialog which shows all assets to be imported. **DO NOT** import project settings -- **UNTICK that entire section**
   {% endhint %}

### Errors On Import:

* You will get import errors that refer to **Post Processing** (Import Processing Process to fix - see below for details)

<figure><img src="https://2670832224-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FL8GtpEwbGN0bJplKvWXb%2Fuploads%2FcJA26ZzFp7N754PtDCSl%2FPostProcessingImportErrors.JPG?alt=media&#x26;token=3a9c2310-1e11-4835-a9a8-f1907342ba97" alt=""><figcaption></figcaption></figure>

### Setup Steps:

* Go to the **Package Manager** (Window > Package Manager)
* Filter by **Unity Registry**
* Search "**Post Process**". You will see **Post Processing** appear in the list (Make sure to install this package)

{% hint style="info" %}
If you want a really **QUICK** setup to have very minimal setup, you can go into the prefabs folder and drag in the **APK\_EntireDemoScene\_Prefab** into your scene - It will have everything added, linked and ready to go!&#x20;
{% endhint %}

### Creating Tags:

* Open the **FirstPerson\_AdventureKit\_Demo** (Assets > Adventure Puzzle Kit > Scenes) or import into your scene as above.
* Select any GameObject in the scene and we'll now create tags and layers.&#x20;
* Select the tags dropdown in the top of the inspector and remove or create as required.

{% hint style="info" %}

* Tags:
  * **InteractiveObject**
  * **ExaminePoint:** Tag for the **ExaminePoint** gameobject parented to the **ExamineCamera**
  * **InspectPoint:** Tag for every single inspect point that exists for an object
* Create Layers:&#x20;
  * User Layer 8: **ExamineLayer** (Doesn't need to be added to objects, referenced in code)
  * User Layer 9: **InspectPointLayer** (Tag for every single inspect point)
  * User Layer 10: **PostProcess**
  * User Layer 11: **PadlockSpinner**
    {% endhint %}

{% hint style="info" %}
**LAYER NOTE:** If you can place these on the corresponding User Layers (As above) it is easier for setup, as Unity will automatically place them in the correct places so the below information might not be relevant to you. (It's worth checking through just encase)
{% endhint %}

### Checking Camera Layers:

* Select the **Main Camera** (APK\_FPSContainer > FPSController > MainCamera)
  * **Physics Raycaster** script - Make sure the **Event Mask** has the layer of **PadlockSpinner**
    * Leave Max Ray Intersections at 0
  * **Post-Process Layer**: Set the Layer to: **Post Process**
  * Select the **Culling Mask** dropdown (On the MainCamera) and make sure:&#x20;
    * **ExamineLayer, InspectPointLayer** and **PostProcess** are **UNTICKED** (Everything else can be ticked)

<figure><img src="https://2670832224-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FL8GtpEwbGN0bJplKvWXb%2Fuploads%2FoFLQ9oHLCQ8lBDJZhscy%2FMainCameraCullingMask.png?alt=media&#x26;token=f118ff1e-aff2-41be-879c-220a597203e7" alt=""><figcaption></figcaption></figure>

* Select the **Examine Camera** (Child of the Main Camera):
  * Select the **Culling Mask** and make sure **ExamineLayer** and **InspectPointLayer** are **TICKED** **ONLY**
  * Clear Flags Set To: **Depth Only**

<figure><img src="https://2670832224-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FL8GtpEwbGN0bJplKvWXb%2Fuploads%2F1UsroBJszFGJm9OPIdCB%2FExamineCameraCullingMask.png?alt=media&#x26;token=718324e0-da9a-4c48-a182-553e280491bf" alt=""><figcaption></figcaption></figure>

* Select the **PostProcessingVolume** GameObject and set the layer to **PostProcess** (Top Right of the Inspector)

{% hint style="danger" %}
If you do have any runtime errors with post processing, you may need to remove the "**Post-Process Layer**" from the main camera and re-add it.
{% endhint %}

### Checking Prefabs:

* Go into the **Prefabs** > **Spawnable** > **Padlock** folder and open the brass and black padlocks seperately, select all of the **combination spinners** and make sure the all have the layer of **PadlockSpinner**.

### Check Examination Objects:&#x20;

* Open the **Examine - Objects** (Child of Puzzle Objects, in the Hierarchy)
  * Find any object which has I**nspect Points**
  * Make sure these inspect points have a layer of **InspectPointLayer** (Or they will not render correctly)

<figure><img src="https://2670832224-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FL8GtpEwbGN0bJplKvWXb%2Fuploads%2FuxAc9fz3KIgeSkkOavp3%2FInspectPointBlade.png?alt=media&#x26;token=2cecaa93-2df8-4d4b-a0a9-2d42d38831c0" alt=""><figcaption></figcaption></figure>

### Final Notes:

* All should be complete and ready to use, if you added the prefab from the folder
