# Installation Guide

### Render Pipeline

**Built-in & URP render pipelines are supported.** And versions Unity 2022 or later where **Unity 6 is recommended**.

### Built-In Render Pipeline

Everything should work out of the box if the rest of this page is followed.

### Universal Render Pipeline (URP)

1. :exclamation:**IMPORTANT:** Go to `Edit/Project Settings/Graphics` and select your preferred `Default Render Pipeline`. You can use the included **UniversalRP** under `Candy Merge/Settings`.
2. :exclamation:**IMPORTANT:** Go to `Edit/Project Settings/Quality` and select your preferred `Render Pipeline Asset`. You can use the included **UniversalRP** under `Candy Merge/Settings`.

### Packages & dependencies

The packages listed here are **required**. Make sure they are installed and updated to the latest version. You install them via the `Package Manager`.

1. :green\_square: `TextMeshPro`
2. :green\_square: `New Input System`
3. :green\_square: `Shader Graph`

### Installation

It is recommended that you create a **new** project before importing the package — but it should work either way if you are careful.

1. Import the Package via the `Unity Package Manager`. This will prompt you to either `Switch Project` or `Import` it directly. Unity explains the difference but as a rule of thumb — if you are working with a freshly created project, you can simply `Import` it.
2. :exclamation:**IMPORTANT:** Go to `Edit/Project Settings/Player` and change `Active Input Handling*` to `Input System Package (New)`. If you cannot find the setting, try searching for it in the search bar or locate it under the `Other Settings` dropdown.
3. :exclamation:**IMPORTANT:** Go to `File/Build Settings` and add the four scenes found in `Candy Merge/Scenes` in the following order (**MUST BE IN THIS ORDER**):\
   \&#xNAN;**`0`**` ``MENU`\
   \&#xNAN;**`1`**` ``LEVEL`\
   \&#xNAN;**`2`**` ``INTERFACE`\
   \&#xNAN;**`3`**` ``LOADING`
4. If you are not using Unity 6 or the physics feels off — make sure to go to `Candy Merge/Systems/Candies/Prefabs` and select `Candy` prefab. Make sure that its `Rigidbody2D` has its `Angular Damping` or `Angular Drag` (depending on Unity version) to <mark style="color:yellow;">`15`</mark> (or your own preference).
5. :exclamation:**IMPORTANT: Mobile Specific Development:** [**\[IF YOU ARE USING THE MOBILE VERSION OF THE PACKAGE\]**](https://assetstore.unity.com/packages/slug/319100)
   1. :exclamation:**IMPORTANT:** Follows are the Mobile Project Settings that should be changed:\
      **Go to** `Edit/Project Settings/Player/Android(or your specific Mobile Platform)/Resolution and Presentation`
      1. \[**Optional**] **Disable** `Run Without Focus`
      2. Change `Auto Rotation Behaviour` to **Sensor**
      3. Under `Allowed Orientations for Auto Rotation` **Disable** both `Portrait` and `Portrait Upside Down`
   2. To get the **Take Screenshot** functionality to work in game over scene, when a game is finished; Look in the script `Candy Merge/Systems/Game Over/Scripts/GameOver` in the function `TakeScreenshot()`. Here a comment gives a simple explanation on how to achieve this on mobile platforms.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://saitama-studio.gitbook.io/candy-merge/getting-started/installation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
