TileWorldCreator
API
// Namespace
using TWCGetGeneratedBlueprintMap
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.
guidThe 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.
layerNameThe blueprint layer nameguidThe unique guid of the layer
GetTileData
TileData GetTileData(string layer, Vector3 position)Returns a tile data from the specified position
layerNameThe blueprint layer name
SaveBlueprintStack
SaveBlueprintStack(string filePath)Save the complete blueprint layer stack
filePathThe file path including the file name and extension.
LoadBlueprintStack
LoadBlueprintStack(string filePath)Load the blueprint stack.
filePathThe file path including the file name and extension.
LoadBlueprintStackAndExecute
LoadBlueprintStackAndExecute(string filePath)Load the blueprint layer stack and execute all blueprint layers.
filePathThe 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.
layerNameThe blueprint layer name
ExecuteBuildLayer
ExecuteBuildLayer(string layerName, bool forceRebuild);Execute specific build layer.
layerNameThe build layer nameforceRebuildForce a complete map rebuild or not.
ExecuteAllBuildLayers
ExecuteAllBuildLayers(bool forceCompleteRebuild);Execute all build layers from the build layer stack.
forceCompleteRebuildForce 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)
mapThe map which should be displayed as texturecolorThe color of the preview texturepreviousTextureIf 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.
layerNameThe blueprint layer namexThe x position on the mapyThe y position on the mapvalueThe map modifier value. True = add tile, False = remove tile
FillMap
FillMap(string layerName, bool value);Fill paint map by the value (true or false)
layerNameThe blueprint layer name with the paint generatorvalueThe 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.
layerNameThe 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
layerNameThe blueprint layer nameguidorlayerIndexThe 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.
seedThe custom random seed
DisableCustomRandomSeed
DisableCustomRandomSeed();Disable custom random seed
Last updated