Easy Grid Builder Pro 2 Documentation
Easy Grid Builder Pro 2 Documentation
  • Getting Started
    • Introduction
    • Quick Start Guide
    • API Documentation
      • API - All Accessible Events
      • API - Grid Manager Classes
      • API - Easy Grid Builder Pro Class
      • API - Grid Buildable Classes
    • Render Pipeline Compatibility
    • Third Party Assets Compatibility
    • Patch Notes
  • Walk Through Tutorial
    • Make a 2D City Builder
      • Setting Up The Scene
      • Setting Up the Grid Values
      • Setting Up Visual - Object Grid
      • Creating Buildable Objects
      • Creating Buildable Object SO Assets
      • Adding Grid Area Disablers And Enablers
    • Make a 3D City Builder
      • Setting Up The Scene
      • Exploring Grid Properties
      • Adding Grid Visuals - Object Grid
      • Creating Buildable Objects
      • Creating Buildable Object SO Assets
      • Explore UI and Quick Play Testing
      • Exploring Grid Managers
      • Exploring Grid Modules
      • Polishing Buildable Objects with Effects
      • Adding Grid Visuals - Procedural Grid
      • Setting Up Custom Surface Projection
      • Adding Terrain
    • Make a 3D Modular House Builder
    • Review Demo Scenes
  • Explore Major Features
    • Setting Up Buildable Objects
    • Setting Up Buildable Objects SO Assets
    • Grid UI Features
    • Grid Visual - Object Grid Features
    • Grid Visual - Procedural Grid Features
    • Explore Build Conditions
    • Explore Grid Heat Map Features
  • Scriptable Objects
    • Buildable Grid Object SO
      • Buildable Grid Object Category SO
    • Buildable Edge Object SO
      • Buildable Edge Object Category SO
    • Buildable Corner Object SO
      • Buildable Corner Object Category SO
    • Buildable Free Object SO
      • Buildable Free Object Category SO
    • Buildable Object UI Category SO
    • Grid Modifier SO
  • Primary Components
    • Easy Grid Builder Pro XZ / XY
      • Easy Grid Builder Pro
      • Editor Grid Visual Handler XZ / XY
      • Grid Data Handler
    • Buildable Object Configurator
    • Buildable Grid Object
    • Buildable Edge Object
    • Buildable Corner Object
    • Buildable Free Object
    • Grid Manager
      • Grid Built Objects Manager
      • Grid Input Manager
      • Grid Save And Load Manager
      • Grid Heat Map Manager
      • Grid Area Modifier Manager
      • Grid Area Disabler Manager
      • Grid Area Enabler Manager
      • Grid UI Manager
    • Buildable Grid Object Ghost
    • Buildable Edge Object Ghost
    • Buildable Corner Object Ghost
    • Buildable Free Object Ghost
    • Buildable Object Destroyer
    • Buildable Object Selector
    • Buildable Object Mover
  • Secondary Components
    • Grid Heat Map
    • Grid Area
    • Grid Area Disabler
      • Basic Grid Area Disabler
    • Grid Area Enabler
      • Basic Grid Area Enabler
    • Grid Area Modifier
    • Buildable Free Object Snapper
    • Grid Area Visual Generator
    • Grid Cell Indicator Visual Generator
    • Buildable Object Effects
    • Grid Custom Surface Projector
    • UI Third Person Cursor Handler
  • Utility Components
    • Terrain Data Manager
    • Global Time Tick Manager
    • WASD Camera Controller
    • Scaling Effect
    • Easy Screen Shot Maker
Powered by GitBook
On this page
  • Creating the Scene
  • Adding Primary Prefabs
  • Setting Up The Grid
  • Setting Up The Camera
  1. Walk Through Tutorial
  2. Make a 2D City Builder

Setting Up The Scene

PreviousMake a 2D City BuilderNextSetting Up the Grid Values

Last updated 5 months ago

Creating the Scene

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'.


Adding Primary Prefabs

Now, locate the Grid Managers and EGB Pro 2 Grid XY prefabs in the SoulGames > Easy Grid Builder Pro 2 > Prefabs directory, and drag them into your scene.

Next, navigate to SoulGames > Easy Grid Builder Pro 2 > Prefabs > Built In UI, 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.

Make sure to unpack the prefabs to prevent any potential issues that could arise in the future.

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.


Setting Up The Grid

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.

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.

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 SoulGames > Easy Grid Builder Pro 2 > Prefabs > Grid Visuals. 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 SoulGames > Easy Grid Builder Pro 2 > Misc Assets > Materials. Locate the Grid Plane Shader Graph Material, right-click on it, and select Refresh. This will refresh the material and should resolve the problem.


Setting Up The Camera

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.

Easy Grid Builder Pro XY
Grid Data Handler