> For the complete documentation index, see [llms.txt](https://soulgamess-studio.gitbook.io/easy-grid-builder-pro-2-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://soulgamess-studio.gitbook.io/easy-grid-builder-pro-2-documentation/walk-through-tutorial/make-a-2d-city-builder/setting-up-the-scene.md).

# Setting Up The Scene

## <mark style="color:green;">Creating the Scene</mark>

First, create a new folder in your Unity project and name it. For this example, we'll name it **'2D City Builder Tutorial Demo'**.

Next, create a new scene inside this folder. To do this, right-click in the folder, select **Create > Scene**, and name the scene. Here, we'll name it **'2D City Builder Tutorial Demo Scene'**.

***

## <mark style="color:green;">Adding Primary Prefabs</mark>

Now, locate the **Grid Managers** and **EGB Pro 2 Grid XY** prefabs in the <mark style="color:purple;">**SoulGames > Easy Grid Builder Pro 2 > Prefabs**</mark> directory, and drag them into your scene.

Next, navigate to <mark style="color:purple;">**SoulGames > Easy Grid Builder Pro 2 > Prefabs > Built In UI**</mark>, find the **EGB Pro 2 UI Prefab**, and drag it into the scene as well.

After adding these prefabs to your scene, select all three in the **Hierarchy**, then right-click, go to **Prefab**, and select **Unpack Completely**.

{% hint style="info" %}
Make sure to unpack the prefabs to prevent any potential issues that could arise in the future.
{% endhint %}

{% hint style="info" %}
Ensure the **'Grid Managers'** component's **Transform** values (Position, Rotation, and Scale) remain at their default settings: **0, 0, 0**. Do not modify these values or make any of these objects a child of another object.
{% endhint %}

<figure><img src="https://2651556506-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeumhICLT4oHoEIEssOjB%2Fuploads%2FKI4053DKkZxtX3Fk4eUH%2Fimage.png?alt=media&amp;token=2ef88d4a-e720-4740-9a61-2da78c2b68d6" alt=""><figcaption></figcaption></figure>

***

## <mark style="color:green;">Setting Up The Grid</mark>

Now, select the **EGB Pro 2 Grid XY** object from your hierarchy. This will serve as our grid system. While you can use multiple grid systems if needed, this tutorial will focus on a single grid system.

As you’ll notice, this object has two components attached. Use the provided links to explore these components and their use cases in greater detail.

* [**Easy Grid Builder Pro XY**](/easy-grid-builder-pro-2-documentation/primary-components/easy-grid-builder-pro-xz-xy.md)
* [**Grid Data Handler**](/easy-grid-builder-pro-2-documentation/primary-components/easy-grid-builder-pro-xz-xy/grid-data-handler.md)

Next, open the **Core Grid Properties** section in your **Easy Grid Builder Pro XY** component. Click the **refresh icon** next to the **Grid Unique ID** property to generate a new unique ID for your grid. This ID is essential for **Saving** and **Loading** functionality.

At this point, you may notice that the grid is not visually represented in the scene. This is because the grid system is currently set to work only in **Play Mode**. To enable the grid visuals in the Editor, toggle the **Update Grid In Editor** property in the **Core Grid Properties** section. This will generate the grid visualization directly in your scene.

{% hint style="info" %}
If you still don’t see the grid visual after enabling the **Update Grid In Editor** property, follow these steps to troubleshoot:

1. Navigate to <mark style="color:purple;">**SoulGames > Easy Grid Builder Pro 2 > Prefabs > Grid Visuals**</mark>. Locate the **Object Grid (Object Prefab)**. Double-click the prefab to open it, then close it. This will refresh the prefab and may resolve the issue.
2. If the issue persists, go to <mark style="color:purple;">**SoulGames > Easy Grid Builder Pro 2 > Misc Assets > Materials**</mark><mark style="color:purple;">.</mark> Locate the **Grid Plane Shader Graph Material**, right-click on it, and select **Refresh**. This will refresh the material and should resolve the problem.
   {% endhint %}

<figure><img src="https://2651556506-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeumhICLT4oHoEIEssOjB%2Fuploads%2ForBlCg9speqjWws3Cqq0%2Fimage.png?alt=media&amp;token=5d1a4584-5be2-425c-83e4-8ac940717531" alt=""><figcaption></figcaption></figure>

***

## <mark style="color:green;">Setting Up The Camera</mark>

Let’s set up the **Camera** to fit our 2D game.

* Start by selecting the **Main Camera** object from your **Hierarchy** and switching to the **Game view**.
* In the **Camera** component, change the **Projection** to **Orthographic**. Then, in the **Projection** section, set the **Size** to **10**.
* Next, configure the background in the **Environment** section. Set the **Background Type** to **Solid Color** and choose a **dark gray** color or any color that matches your preference.
* Finally, adjust the **Transform** component by setting the **Position** to **0, 0, -10**.

This setup will ensure your camera is properly configured for a 2D game environment.

<figure><img src="https://2651556506-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeumhICLT4oHoEIEssOjB%2Fuploads%2FxjNkZXJvULICCajAJUe0%2Fimage.png?alt=media&amp;token=50cf4ac1-af88-42e7-9b9f-6c194527a5a9" alt=""><figcaption></figcaption></figure>
