Setting Up The Scene
To start building your 3D city, you’ll need to create a project folder, set up a new scene, and add the necessary Easy Grid Builder Pro 2 prefabs. Let’s walk through the process step-by-step.
Creating the Project Structure
First, organize your project by creating a new folder and a demo scene.
Create a New Folder:
Create a folder in your Unity project for this tutorial.
Example name:
3D City Builder Tutorial Demo
Create a New Scene:
Inside this folder, create a new scene for your demo.
Example name:
3D City Builder Tutorial Demo Scene
Adding Grid Manager Prefab
Next, add the core Easy Grid Builder Pro 2 prefabs to your scene.
Locate the Grid Managers prefab in: Assets/SoulGames/Easy Grid Builder Pro 2/Prefabs/Grid Managers.prefab.
Drag and drop the prefab into your scene. This prefab manages all grid systems in your project.
Important: After adding the prefab:
Right-click on the Grid Managers object in the Hierarchy.
Select Prefab > Unpack Completely to unpack the prefab.
If your scene already includes an EventSystem GameObject, you’ll find another one in the Grid Managers prefab. Remove either the existing EventSystem or the one inside Grid Managers to avoid conflicts.
Adding And Configuring Grid System
Now, let’s add and set up the grid system for your scene.
Add the Grid Prefab:
Locate the EGB Pro 2 Grid XZ prefab in: Assets/SoulGames/Easy Grid Builder Pro 2/Prefabs/EGB Pro 2 Grid XZ.prefab.
Drag and drop it into your scene.
Unpack the Prefab:
Right-click on the prefab in the Hierarchy and select Prefab > Unpack Completely.
Grid Prefab Selection:
Use the EGB Pro 2 Grid XZ prefab for 3D games, as it operates on the XZ plane.
The alternative EGB Pro 2 Grid XY prefab works on the XY plane but is otherwise identical.
Generate a Unique Grid ID:
After unpacking, locate the Grid Unique ID property in the Core Grid Properties section of the grid component.
Click the refresh button next to the property to generate a unique ID.
Display the Grid in the Editor:
Enable the Update Grid In Editor property (below the Grid Unique ID property) to preview the grid in the Unity Editor.
To get the most out of the Easy Grid Builder Pro XZ/XY component, it’s highly recommended to familiarize yourself with its features and properties. This will help you better understand how the grid system works and how to utilize it effectively in your projects. Use the link below to Learn More:
Easy Grid Builder Pro XZ / XYReplacing the Existing Camera with a Better Camera
To enhance the camera functionality in your scene, you can replace the default Main Camera with the WASD Camera Controller Prefab provided by Easy Grid Builder Pro 2.
Remove the Existing Camera:
In the Hierarchy, delete the Main Camera object.
Add the WASD Camera Controller Prefab:
Navigate to: Assets/SoulGames/Easy Grid Builder Pro 2/Prefabs/Sample Camera Controller/WASD Camera Controller Prefab.prefab.
Drag and drop the WASD Camera Controller Prefab into your scene.
Unpack the Prefab:
Right-click on the WASD Camera Controller Prefab in the Hierarchy.
Select Prefab > Unpack Completely.
Adjust the Camera’s Transform:
Set the Transform Position values to:
X: 0
Y: -10
Z: 20
Set the Transform Rotation values to:
X: 0
Y: 0
Z: 0
Keep all other values at their default settings.
For a deeper understanding of the WASD Camera Controller and how to customize it for your scene, refer to the detailed documentation Using the link below:
WASD Camera ControllerLast updated