Class TesseraGeneratorUtils
Contains much of the details of TesseraGenerator. Most of these methods need to be run in the main Unity thread. Anything safe to run elsewhere is inside TesseraGeneratorHelper instead.
Inheritance
Namespace: Tessera
Assembly: Tessera.dll
Syntax
public static class TesseraGeneratorUtils
Methods
Instantiate(TesseraTileInstance, Transform, IEngineInterface)
Utility function that instantiates a tile instance in the scene.
This is the default function used when you do not pass onCreate to the Generate method.
It is essentially the same as Unity's normal Instantiate method with extra features:
- respects instantiateChildrenOnly
- applies mesh transformations (Pro only)
Declaration
public static GameObject[] Instantiate(TesseraTileInstance instance, Transform parent, IEngineInterface engine = null)
Parameters
| Type | Name | Description |
|---|---|---|
| TesseraTileInstance | instance | The instance being created. |
| Transform | parent | The game object to parent the new game object to. This does not affect the world position of the instance |
| IEngineInterface | engine |
Returns
| Type | Description |
|---|---|
| GameObject[] | The game objects created. |
Instantiate(TesseraTileInstance, Transform, GameObject, bool, IEngineInterface)
Utility function that instantiates a tile instance in the scene.
This is the default function used when you do not pass onCreate to the Generate method.
It is essentially the same as Unity's normal Instantiate method with extra features:
- respects instantiateChildrenOnly
- applies mesh transformations (Pro only)
Declaration
public static GameObject[] Instantiate(TesseraTileInstance instance, Transform parent, GameObject gameObject, bool instantiateChildrenOnly, IEngineInterface engine = null)
Parameters
| Type | Name | Description |
|---|---|---|
| TesseraTileInstance | instance | The instance being created. |
| Transform | parent | The game object to parent the new game object to. This does not affect the world position of the instance |
| GameObject | gameObject | The game object to actually instantiate. Usually this is instance.Tile.gameObject |
| bool | instantiateChildrenOnly | Should gameObject be created, or just it's children. |
| IEngineInterface | engine |
Returns
| Type | Description |
|---|---|
| GameObject[] | The game objects created. |
InstantiateUncertaintyObjects(TesseraGenerator, IGrid, TilePropagator)
Declaration
public static void InstantiateUncertaintyObjects(TesseraGenerator generator, IGrid grid, TilePropagator propagator)
Parameters
| Type | Name | Description |
|---|---|---|
| TesseraGenerator | generator | |
| IGrid | grid | |
| TilePropagator | propagator |