# ⚙️ 2. Installation & Setup

Getting started with **GPU Animation Entities PRO** requires a specific Unity environment, as the asset relies heavily on the Data-Oriented Technology Stack (DOTS) and the Universal Render Pipeline (URP).

Follow this step-by-step guide carefully to ensure your project is configured correctly. Missing the URP configuration steps is the #1 cause of invisible meshes!

***

#### 📦 Prerequisites

Before importing the asset, ensure your Unity project meets the following baseline requirements:

* **Unity Version:** 2022.2 or newer (Unity 6 is fully supported).
* **Render Pipeline:** Universal Render Pipeline (URP 14.0+).
* **Scripting Backend:** IL2CPP (Recommended for final builds) / Mono (Editor).

***

#### Step 1: Install Required Dependencies

Since this is a strict ECS asset, you must install the official Unity DOTS packages.

1. Open your Unity project.
2. Navigate to **Window > Package Manager**.
3. Click the + icon in the top left corner and select **"Add package by name..."**.
4. Add the following packages one by one:
   * `com.unity.entities` (Version 1.4.5+)
   * `com.unity.entities.graphics` (Version 1.4.18+)
   * `com.unity.burst` (Version 1.8.27+)

> 💡 **Tip:** If you are starting a fresh project, the easiest way to get all dependencies is to create a new project using the **"3D (URP) Core"** template, and then install the Entities packages.

***

#### Step 2: Import the Asset

Once the dependencies are resolved:

1. Open the **Window > Package Manager**.
2. Select **My Assets** from the dropdown.
3. Search for **GPU Animation Entities PRO**.
4. Click **Download**, then **Import**.
5. Ensure all folders (especially Editor, Runtime, and Samples\~) are checked, and click **Import**.

***

#### Step 3: URP Configuration (🚨 CRITICAL)

For the GPU skinning to work, the Universal Render Pipeline must be allowed to pass DOTS data to the GPU. **If you skip this step, your animated characters will be invisible.**

1. Locate your active **URP Asset** in the Project window (usually found in Assets/Settings/ or similar).
2. Select the URP Asset to view it in the Inspector.
3. Scroll down to the **Advanced** section.
4. Ensure the following settings are **ENABLED** (Checked):
   * ✅ **SRP Batcher**
   * ✅ **DOTS Instancing** (This is mandatory for `_SnivelerRenderFrames` to reach the shader).

> 🛑 **Troubleshooting:** If you cannot find the "DOTS Instancing" checkbox, ensure that the `com.unity.entities.graphics` package is successfully installed and compiled.

***

#### Step 4: Burst Compiler Settings

To achieve maximum performance, ensure the Burst compiler is active.

1. Go to **Jobs > Burst > Enable Compilation** (Ensure it has a checkmark).
2. Go to **Jobs > Burst > Synchronous Compilation** (Optional, but recommended during Editor playback to prevent initial stuttering).

***

#### Step 5: Explore the Demo Scenes

The best way to verify your installation and learn the system is to explore the provided demo scenes. Navigate to the Samples\~ folder (you may need to copy it into your Assets folder if Unity imported it as a hidden package sample).

We have provided three distinct environments:

* 🟢 **DemoZone 1 (Basics):**\
  Located in `DemoZone1/Scenes/Landing.unity`. Demonstrates basic baking, simple movement, and parameter changing (Speed, Attack triggers) via UI.
* ⚔️ **DemoZone 2 (Sockets & Weapons):**\
  Located in `DemoZone2/Scenes/Landing.unity`. Showcases the **Zero-Latency Socket System**. Watch how the character smoothly equips and unequips a sword and an axe with perfect frame synchronization.
* 🏰 **DemoZone 3 (Massive Crowd & RTS Logic):**\
  Located in `DemoZone3/Scenes/Landing.unity`. The ultimate stress test. Features spatial hashing, combat decision-making, ranged projectiles, and thousands of units fighting simultaneously.


---

# 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://sniveler-code.gitbook.io/dots/gpu-animation-entities-pro/2.-installation-and-setup.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.
