Version:

Grid Component

The Grid component renders a wireframe grid. It is primarily used in scene-building workflows to set a frame of reference and visualize relative sizes and distances between objects.

Provider

Atom Gem

Grid Component Properties

The Grid component has simple properties for changing its size and appearance.

grid-component-base-properties

PropertyDescriptionValuesDefault
Grid SizeThe total grid size in meters.0.0 - 1,000,00032.0
Axis ColorThe color used for drawing grid lines for the main axis.(0-255, 0-255, 0-255)(0, 0, 255)
Primary Grid SpacingThe distance between grid lines drawn in the primary color.0.1 to Infinity1.0
Primary ColorThe color used for drawing primary grid lines.(0-255, 0-255, 0-255)(64, 64, 64)
Secondary Grid SpacingThe distance between grid lines drawn in the secondary color.0.1 to Infinity0.25
Secondary ColorThe color used for drawing secondary grid lines.(0-255, 0-255, 0-255)(128,128,128)

GridComponentRequestBus

Method NameDescriptionParameterReturnScriptable
‘SetSize’Sets the size of the entire grid.Size: FloatNoneYes
‘SetPrimarySpacing’Sets spacing between primary grid lines.Spacing: FloatNoneYes
‘SetSecondarySpacing’Sets spacing between secondary grid lines.Spacing: FloatNoneYes
‘SetAxisColor’Sets the color of the grid axis lines.Line Color: ColorNoneYes
‘SetPrimaryColor’Sets the color of primary grid lines.Line Color: ColorNoneYes
‘SetSecondaryColor’Sets the color of secondary gridlines.Line Color: ColorNoneYes
‘GetSize’Gets the size of the entire grid.NoneSize: FloatYes
‘GetPrimarySpacing’Gets spacing between primary grid lines.NoneSpacing: FloatYes
‘GetSecondarySpacing’Gets spacing between secondary grid lines.NoneSpacing: FloatYes
‘GetAxisColor’Gets the color of the grid axis lines.NoneLine Color: ColorYes
‘GetPrimaryColor’Gets the color of primary grid lines.NoneLine Color: ColorYes
‘GetSecondaryColor’Gets the color of secondary gridlines.NoneLine Color: ColorYes

GridComponentNotificationBus

Method NameDescriptionParameterReturnScriptable
‘OnGridChanged’Notify any handlers that the grid has been modified.NoneNoneNo