Grid Cell Indicator Visual Generator

The Grid Cell Indicator Visual Generator component is located in: SoulGames > Easy Grid Builder Pro 2 > Scripts > Grid Visuals Scripts This component is very similar to the Grid Area Visual Generator component. However, it is only used in Grid Cell Indicator Prefab located in: SoulGames > Easy Grid Builder Pro 2 > Prefabs > Grid Cell Indicator. This prefab is used in the Buildable Object Selector component's Grid Cell Indicator section. It displays a visual cell indicator that follows the mouse pointer and snaps to the nearest grid cell.


General Settings

Property
Function
Required

Warp Around Surface Below

Enables warping of the generated visual indicator to align with underlying surfaces

No

Custom Warp Surface Layer Mask

Specifies which layers are eligible for surface warping

No

Raycast Above Offset

The height above the surface from which raycasting is performed to determine the Warp Surface

No

Space Between Visual and Surface

The distance between to offset the visual indicator from the detected surface (This is used for offsetting the visual slightly to prevent overlapping)

No


Area Shape

Property
Function
Required

Shape

Defines the shape of the generated visual indicator area (Rectangle or Circle)

Yes

Cell Size

Specifies the size of each visual cell. (While this doesn’t have to match your Grid System’s cell size, it is recommended to keep them the same in most cases)

Yes

Width

Number of cells along the width of the visual shape

Yes

Length

Number of cells along the length of the visual shape

Yes

Radius

Radius for circular grid visuals (This is ignored for Rectangular shape)

Yes


Gizmos

Property
Function
Required

Enable Gizmos

Toggles the display of debugging gizmos

No

Enable Simplified Gizmos

Displays a simplified gizmo representation (Better for editor performance)

No

Gizmo Color

Sets the color for the debug gizmos

No

If the blue gizmos aren’t visible, ensure that "Show Gizmos" is enabled in your Scene view.


Visual Settings

Property
Function
Required

Visual Material

Material applied to the visual indicator

Yes

Cell Image Texture

The texture used for each cell in the visual indicator

Yes

Cell Show Color

Color when the generated visual is visible

Yes

Cell Hide Color

Color when the generated visual is hidden

Yes

Cell Show Color HDR

Similar to the Cell Show Color property this one uses an emissive HDR color

No

Cell Hide Color HDR

Similar to the Cell Hide Color property this one uses an emissive HDR color

No

Color Transition Speed

Speed of color transitions between show and hide

Yes

In the Visual Material property, custom materials cannot be used. Instead, you must use the specific material called Grid Quad Shader Graph Material, located in: SoulGames > Easy Grid Builder Pro 2 > Misc Assets > Materials.

This material uses the Grid Quad Shader Graph shader, which is specifically designed for these components. If you need multiple versions of this material, simply duplicate it and use the duplicates with the Grid Area Visual Generator component.

For the Cell Image Texture property, you can use any of the provided cell textures located in: SoulGames > Easy Grid Builder Pro 2 > Misc Assets > Grid Textures > Cell Textures, or you can use any custom cell texture you’ve designed.


Scrolling Noise

You can apply a Scrolling Noise effect to the generated visual indicator, similar to the functionality available in the Visual - Object Grid section of your Easy Grid Builder Pro XZ / XY components.

Property
Function
Required

Use Scrolling Noise

Enables scrolling noise textures on the generated visuals

No

Noise Texture

The texture used for noise

No

Texture Tiling

Tiling factor for the noise texture

No

Texture Scrolling

Scrolling speed and direction for the noise texture

No

For the Noise Texture property, you can use any of the provided noise textures located in: SoulGames > Easy Grid Builder Pro 2 > Misc Assets > Grid Textures > Scrolling Noise Textures, or you can use any custom cell texture you’ve designed.


Example Use case

As mentioned earlier, this component is exclusively used with the Grid Cell Indicator Prefab in the Buildable Object Selector component. When using it, it is recommended to create a Prefab Variant to customize its values for your grid.

To create a prefab variant:

  1. Locate the Grid Cell Indicator Prefab in: SoulGames > Easy Grid Builder Pro 2 > Prefabs > Grid Cell Indicator.

  2. Right-click the prefab and select Create > Prefab Variant. This will create a new version of the prefab that you can customize.

  3. In the new prefab, modify the Grid Cell Indicator Visual Generator component to fit your requirements.

The most important value to adjust is usually the Cell Size. Set it to match your grid system's Cell Size, and make any other changes necessary to align with your scene setup.

Next, select the Buildable Object Selector GameObject located within the Grid Managers GameObject in your scene.

In the Buildable Object Selector component attached to this GameObject, locate the section for enabling the Grid Cell Indicator.

To enable this feature:

  1. Check the Enable Grid Cell Indicator property.

  2. Assign the new prefab variant you created to the Grid Cell Indicator Prefab property.

This setup activates the grid cell indicator functionality with your customized prefab variant.

Last updated