TileWorldCreator Documentation
  • Welcome
  • Getting Started
    • Update 3.1
  • TileWorldCreator component
  • Blueprint Layers
  • Build Layers
  • Tiles preset
  • Generators
  • Modifiers
  • Presets
  • Save & Load
  • Runtime modification
  • Multiple Maps
  • Custom tiles
  • Custom actions
  • Demo scenes
  • FAQ
  • API
    • TileWorldCreator
    • Events
Powered by GitBook
On this page
  • API
  • GetGeneratedBlueprintMap
  • GetMapOutputFromBlueprintLayer
  • GetTileData
  • SaveBlueprintStack
  • LoadBlueprintStack
  • LoadBlueprintStackAndExecute
  • ExecuteAllBlueprintLayers
  • ExecuteBlueprintLayer
  • ExecuteBuildLayer
  • ExecuteAllBuildLayers
  • UpdatePreviewTexture
  • ModifyMap
  • FillMap
  • CopyMap
  • GetAction
  • SetCustomRandomSeed
  • DisableCustomRandomSeed
  1. API

TileWorldCreator

API

// Namespace
using TWC

GetGeneratedBlueprintMap

WorldMap GetGeneratedBlueprintMap(string guid);

Returns the final generated map from a blueprint layer as a WorldMap class. The WorldMap class contains the worldPartitionTiles dictionary which contains all generated data from the map.

  • guid The layer unique guid or layer name as string

GetMapOutputFromBlueprintLayer

bool[,] GetMapOutputFromBlueprintLayer(string layerName)
bool[,] GetMapOutputFromBlueprintLayer(System.Guid guid)

Return the final generated map from a blueprint layer as a bool array.

  • layerName The blueprint layer name

  • guid The unique guid of the layer

GetTileData

TileData GetTileData(string layer, Vector3 position)

Returns a tile data from the specified position

  • layerName The blueprint layer name

SaveBlueprintStack

SaveBlueprintStack(string filePath)

Save the complete blueprint layer stack

  • filePath The file path including the file name and extension.

LoadBlueprintStack

LoadBlueprintStack(string filePath)

Load the blueprint stack.

  • filePath The file path including the file name and extension.

LoadBlueprintStackAndExecute

LoadBlueprintStackAndExecute(string filePath)

Load the blueprint layer stack and execute all blueprint layers.

  • filePath The file path including the file name and extension.

ExecuteAllBlueprintLayers

ExecuteAllBlueprintLayers();

Executes all layers in the blueprint stack

ExecuteBlueprintLayer

ExecuteBlueprintLayer(string layerName);

Execute single blueprint layer specified by name.

  • layerName The blueprint layer name

ExecuteBuildLayer

ExecuteBuildLayer(string layerName, bool forceRebuild);

Execute specific build layer.

  • layerName The build layer name

  • forceRebuild Force a complete map rebuild or not.

ExecuteAllBuildLayers

ExecuteAllBuildLayers(bool forceCompleteRebuild);

Execute all build layers from the build layer stack.

  • forceCompleteRebuild Force a complete map rebuild or not.

UpdatePreviewTexture

UpdatePreviewTexture(bool[,] map, Color color, Texture2D previousTexture)

Update the preview texture (thumbnail) based on the map and color. (Used by the paint modifier action)

  • map The map which should be displayed as texture

  • color The color of the preview texture

  • previousTexture If not null, the last texture which should be merged with the new one.

ModifyMap

ModifyMap(string layerName, int x, int y, bool value);

Modify the map at runtime. For this to work, a blueprint layer must have a paint generator assigned.

  • layerName The blueprint layer name

  • x The x position on the map

  • y The y position on the map

  • value The map modifier value. True = add tile, False = remove tile

FillMap

FillMap(string layerName, bool value);

Fill paint map by the value (true or false)

  • layerName The blueprint layer name with the paint generator

  • value The value (true or false)

CopyMap

CopyMap(string layerName);

Copies the last map output and adds it to the paint modifier so that it can be modified manually.

  • layerName The blueprint layer name with the paint generator

GetAction

TWCBlueprintAction GetAction(string layerName, string guid);
TWCBlueprintAction GetAction(string layerName, int layerIndex);

Get an action from the blueprint layer stack by its guid or layer index

  • layerName The blueprint layer name

  • guid or layerIndex The unique guid of the action or the layer index

SetCustomRandomSeed

SetCustomRandomSeed(int seed);

Set a custom random seed for the map generation. When setting a custom random seed the random seed also gets activated. Use DisableCustomRandomSeed, to disable it again.

  • seed The custom random seed

DisableCustomRandomSeed

DisableCustomRandomSeed();

Disable custom random seed

PreviousFAQNextEvents

Last updated 1 month ago