> For the complete documentation index, see [llms.txt](https://simons-assets.gitbook.io/playable-vehicle-ai-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://simons-assets.gitbook.io/playable-vehicle-ai-documentation/quick-start.md).

# Quick Start

### 1 - Import Playable Vehicle AI package

Import the Playable Vehicle AI package from the Unity Package Manager, just like any other package (download & import)

Once the package is imported, you should see a new folder called **Simon's Asset** in your Asset folder. It contains the Playable Vehicle AI folder with all the resources you need to make it work.

Here is a view of the tree structure of the package:

<figure><img src="/files/8o12prfc121kb7rkjcqH" alt=""><figcaption></figcaption></figure>

### 2 - Dependencies

:warning: For now **Playable Vehicle AI** needs [**Edy's Vehicle Physics**](https://assetstore.unity.com/packages/tools/physics/edy-s-vehicle-physics-403) to work.

If you enconter an error like:

**`The type or namespace name 'EVP' could not be found (are you missing a using directive or an assembly reference?)`**

**Please Install EVP**.

**Playable Vehicle AI** also need the [**com.unity.ai.navigation**](https://docs.unity3d.com/Packages/com.unity.ai.navigation@2.0/manual/) Unity packages to work.

**com.unity.ai.navigation** is essential. It's used to generate a navmesh surface and calculate the path between each waypoints. See the [Layer & Navmesh](#id-3-layer-and-navmesh) section

To install **com.unity.ai.navigation** in the Package Manager click on Unity Registery and search for "**com.unity.ai.navigation**". Then install de package.

### 3 - Layer & Navmesh

In order for cars to find their way across your terrain, Playable Vehicle AI needs a navmesh surface. I will guide you in images to create this navmesh surface in a few very simple steps.

#### 1 - Create an empty GameObject and name it NavMeshSurface (or something explicit that you will find easily)

<figure><img src="/files/ZEiN6oFWXoYKJmDYT4PM" alt=""><figcaption></figcaption></figure>

#### 2 - Add the NavMeshSurface component on this new GameObject

<figure><img src="/files/OpRB0kRrlzu51vae5HRN" alt=""><figcaption></figcaption></figure>

#### 3 - In the NavmeshSurface component you will have to fill a agent type, adefault area and bake it based on a layer that will be attached to you roads GameObjects

<figure><img src="/files/5TaqRpZCK8R6BWWpkork" alt=""><figcaption></figcaption></figure>

#### 4 - Click on the Agent Type select then on Open Agent Settings...

<figure><img src="/files/yZg204T6Q1LM0dec6nFW" alt=""><figcaption></figcaption></figure>

#### 5 - This should open the Navigation window. In the Navigation window, create a new Agent Type by clicking on the + button

<figure><img src="/files/oYYc2CBQtCmON0Fcmxnz" alt=""><figcaption></figcaption></figure>

#### 6 - Name this new Agent Type "Car" or something you will be able to retrieve easily.

<figure><img src="/files/wpd3baTnMXjDphqGIRvB" alt=""><figcaption></figcaption></figure>

#### 7 - Then click on the Area button

<figure><img src="/files/BWvoe5M4pVcUdhPdmDRp" alt=""><figcaption></figcaption></figure>

#### 8 - Create a new Area by giving a name to the first one that is free. (here it is the Area for cars so I call it Car)

<figure><img src="/files/6ggxXM6fpLRtaQvnR7cq" alt=""><figcaption></figcaption></figure>

#### 9 - Go back to the Navmesh Surface component and set Agent on "Car" and the Default Area on "Car"

<figure><img src="/files/zoC1EKl7dxaFBwbMzgyd" alt=""><figcaption></figcaption></figure>

#### 10 - Then, the last step is to set your roads objects on a dedicated layer. To do that, in the Layer select click on "Add Layer..."

<figure><img src="/files/jCQsy6Tj2QBR920rvvWM" alt=""><figcaption></figcaption></figure>

#### 11 - Add a "Roads" (or any name that you preffer) layer

<figure><img src="/files/ZR3VAkW5z0ZxzbtfGyyd" alt=""><figcaption></figcaption></figure>

#### 12 - Select the parent GameObject of every roads objects in your scene and set the Layer on the one you've just created

<figure><img src="/files/1dfnen8hwxspgZXpJ5OY" alt=""><figcaption></figcaption></figure>

#### 13 - Unity will ask if you want to set the layer for all child objects. Click "Yes".

<figure><img src="/files/b2N9NkEZz3pU4QdBkGCK" alt=""><figcaption></figcaption></figure>

#### 14 - Finally in the "Object Collection" > "Include Layers" field select your layer and click on "Bake".

<figure><img src="/files/6JbN9x9ZcnxFRclNMARI" alt=""><figcaption></figcaption></figure>

#### 15 - Once the baking process is done, you should be able to see your Car Navmesh Area when you select your Navmesh Surface object.

<figure><img src="/files/ss8WpkXPNt3EBZIGhsMw" alt=""><figcaption></figcaption></figure>

That's it... Your Navmesh is ready. But you will have to create some waypoints to allow your car to navigate.

To do that, you can go to the [Waypoint ](/playable-vehicle-ai-documentation/waypoints.md)page
