API

TileWorldCreatorManager class

AddCellsToLayer
AddCellsToLayer(string _layerName, HashSet<Vector2> _cellPositions)

Add cells to a blueprint layer.

AddCellsToLayerByGuid
AddCellsToLayerByGuid(string _layerGuid, HashSet<Vector2> _cellPositions)

Add cells to a blueprint layer by its layer guid.

RemoveCellsFromLayer
RemoveCellsFromLayer(string _layerName, HashSet<Vector2> _cellPositions)

Remove cells from a blueprint layer.

ResetMap
ResetMap()

Resets all blueprint layers (painted cells) and build layers. Should be used when using TWC at runtime on Start / Initialization before generating a new map.

ClearLayer
ClearLayer(string _layerName)

Clear all cell positions from a blueprint layer.

FillLayer

Fill all cells from a blueprint layer.

GenerateCompleteMap

Generates a complete map. Executes blueprint layer stack and build layer stack.

ExecuteBlueprintLayers

Executes blueprint layer stack.

ExecuteBuildLayers

Executes build layer stack. ExecutionMode: Normal: Only rebuilds changes. FromScratch: Rebuilds complete map.

GetBlueprintLayer

Returns a BueprintLayer object.

GetBuildLayer

Returns a build layer object.

GetBuildLayerByGuid

Returns a BuildLayer object.

GetRelativeGridPosition

Convert world position to grid position relative to the TileWorldCreator Manager transforms. Can be used in combination with IsRelativePositionOverGrid.

IsRelativePositionOverGrid

Returns true or false if position is over grid.

SetBlueprintLayerActiveState

Enable or disable a blueprint layer.

SetBuildLayerActiveState

Enable or disable a blueprint layer

GetCellPositionsInRadius

Returns a HashSet<Vector2> of all blueprint cell positions within radius from position.

GetBuildLayerTileDataFromPosition

Returns a TileData object from position.

Last updated