GridObject

< 1 min read

Updated on March 17, 2022

public void SetObjectGridSquare(GridSquare grid)

Sets this object’s grid to the provided one. This method is called when the object is placed.

//Sets the object GridSquare
GridSquare grid;
GridObject gridObj;
void Start()
{
    gridObj.SetObjectGridSquare(grid);
}

public GridSquare GetObjectGridSquare()

Returns this objects grid.

//Gets the object GridSquare
GridSquare grid;
GridObject gridObj;
void Start()
{
    grid = gridObj.GetObjectGridSquare();
}