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.
GenerateCompleteMap
GenerateCompleteMap()
Generates a complete map. Executes blueprint layer stack and build layer stack.
ExecuteBuildLayers
ExecuteAllBuildLayers(ExecutionMode)
Executes build layer stack. ExecutionMode: Normal: Only rebuilds changes. FromScratch: Rebuilds complete map.
GetRelativeGridPosition
GetRelativeGridPosition(Vector3 _worldPosition)
Convert world position to grid position relative to the TileWorldCreator Manager transforms. Can be used in combination with IsRelativePositionOverGrid.
IsRelativePositionOverGrid
IsRelativePositionOverGrid(Vector2 _relativePosition)
Returns true or false if position is over grid.
SetBlueprintLayerActiveState
SetBlueprintLayerActiveState(string _layerName, bool _state)
Enable or disable a blueprint layer.
SetBuildLayerActiveState
SetBuildLayerActiveState(string _layerName, bool _state)
Enable or disable a blueprint layer
Last updated