Class TesseraGenerateOptions
Additional settings to customize the generation at runtime.
Namespace: Tessera
Assembly: Tessera.dll
Syntax
public class TesseraGenerateOptions
Fields
cancellationToken
Allows interuption of the calculations
Declaration
public CancellationToken cancellationToken
Field Value
Type | Description |
---|---|
CancellationToken |
initialConstraints
If set, overrides TesseraGenerator.initialConstraints and TesseraGenerator.searchInitialConstraints.
Declaration
public List<ITesseraInitialConstraint> initialConstraints
Field Value
Type | Description |
---|---|
List<ITesseraInitialConstraint> |
multithreaded
If set, then generation is offloaded to another thread stopping Unity from freezing. Requires you to use StartGenerate in a coroutine. Multithreaded is ignored in the WebGL player, as it doesn't support threads.
Declaration
public bool multithreaded
Field Value
Type | Description |
---|---|
bool |
onComplete
Called when the generation is complete. By default, checks for success then invokes onCreate on each instance.
Declaration
public Action<TesseraCompletion> onComplete
Field Value
Type | Description |
---|---|
Action<TesseraCompletion> |
onCreate
Called for each newly generated tile. By default, Tessera.TesseraGenerator.Instantiate(Tessera.TesseraTileInstance,Transform,IEngineInterface) is used.
Declaration
public Action<TesseraTileInstance> onCreate
Field Value
Type | Description |
---|---|
Action<TesseraTileInstance> |
progress
Called with a string describing the current phase of the calculations, and the progress from 0 to 1. Progress can move backwards for retries or backtracing. Note progress can be called from threads other than the main thread.
Declaration
public Action<string, float> progress
Field Value
Type | Description |
---|---|
Action<string, float> |
seed
Fixes the seed for random number generator. By defult, random numbers from from Unity.Random.
Declaration
public int? seed
Field Value
Type | Description |
---|---|
int? |