Class TesseraTileBase
Inheritance
Object
Component
Behaviour
MonoBehaviour
TesseraTileBase
Implements
ISerializationCallbackReceiver
Inherited Members
MonoBehaviour.IsInvoking()
MonoBehaviour.CancelInvoke()
MonoBehaviour.StopCoroutine(Coroutine)
MonoBehaviour.StopAllCoroutines()
MonoBehaviour.useGUILayout
MonoBehaviour.runInEditMode
Behaviour.enabled
Behaviour.isActiveAndEnabled
Component.GetComponent<T>()
Component.TryGetComponent<T>(out T)
Component.GetComponentInChildren<T>()
Component.GetComponentsInChildren<T>()
Component.GetComponentInParent<T>()
Component.GetComponentsInParent<T>()
Component.GetComponents<T>()
Component.transform
Component.gameObject
Component.tag
Object.GetInstanceID()
Object.GetHashCode()
Object.Instantiate(Object, Vector3, Quaternion)
Object.Instantiate(Object, Vector3, Quaternion, Transform)
Object.Instantiate(Object)
Object.Instantiate(Object, Transform)
Object.Instantiate<T>(T)
Object.Instantiate<T>(T, Vector3, Quaternion)
Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
Object.Instantiate<T>(T, Transform)
Object.Destroy(Object)
Object.DestroyImmediate(Object)
Object.DontDestroyOnLoad(Object)
Object.DestroyObject(Object)
Object.FindObjectsOfType<T>()
Object.FindObjectOfType<T>()
Object.ToString()
Object.name
Object.hideFlags
Assembly: Tessera.dll
Syntax
public abstract class TesseraTileBase : MonoBehaviour, ISerializationCallbackReceiver
Fields
cellSize
The size of one cell in the tile.
NB: This field is only used in the Editor - you must set cellSize to match.
Declaration
[Tooltip("The size of one cell in the tile.")]
[FormerlySerializedAs("tileSize")]
public Vector3 cellSize
Field Value
center
Where the center of tile is.
For big tiles that occupy more than one cell, it's the center of the cell with offset (0, 0, 0). The tile may not actually occupy that cell!
Declaration
[Tooltip("Where the center of tile is.")]
public Vector3 center
Field Value
instantiateChildrenOnly
If set, when being instantiated by a Generator, only children will get constructed.
If there are no children, then this effectively disables the tile from instantiation.
Declaration
[Tooltip("If set, when being instantiated by a Generator, only children will get constructed.")]
public bool instantiateChildrenOnly
Field Value
palette
Set this to control the colors and names used for painting on the tile.
Defaults to defaultPalette.
Declaration
[Tooltip("Set this to control the colors and names used for painting on the tile.")]
public TesseraPalette palette
Field Value
reflectable
If true, when generating, reflections in the x-axis will be used.
Declaration
[Tooltip("If true, when generating, reflections in the x-axis will be used.")]
public bool reflectable
Field Value
rotatable
If true, when generating, rotations of the tile will be used.
Declaration
[Tooltip("If true, when generating, rotations of the tile will be used.")]
public bool rotatable
Field Value
rotationGroupType
If rotatable is on, specifies what sorts of rotations are used.
Declaration
[Tooltip("If rotatable is on, specifies what sorts of rotations are used.")]
public RotationGroupType rotationGroupType
Field Value
sylvesFaceDetails
A list of outward facing faces.
For a normal cube tile, there are 6 faces. Each face contains adjacency information that indicates what other tiles can connect to it.
It is recommended you only edit this via the Unity Editor, or Get(Vector3Int, CellFaceDir) and AddOffset(Vector3Int)
Declaration
[NonSerialized]
public List<SylvesOrientedFace> sylvesFaceDetails
Field Value
sylvesOffsets
A list of cells that this tile occupies.
For a normal cube tile, this just contains Vector3Int.zero, but it will be more for "big" tiles.
It is recommended you only edit this via the Unity Editor, or AddOffset(Vector3Int) and RemoveOffset(Vector3Int)
Declaration
[NonSerialized]
public List<Vector3Int> sylvesOffsets
Field Value
Type |
Description |
List<Vector3Int> |
|
symmetric
If true, Tessera assumes that the tile paint matches the the symmetry of the tile.
Disable this if there are important details of your tile that the paint doesn't show.
Turning symmetric on can have some performance benefits, and affects the behaviour of the mirror constraint.
Declaration
[Tooltip("If true, Tessera assumes that the tile paint matches the the symmetry of the tile.\nIf false, assumes every possible rotation is unique and not interchangable.")]
public bool symmetric
Field Value
Properties
SubFaceInfo
Declaration
public abstract ISubFaceInfo SubFaceInfo { get; }
Property Value
SylvesCellGrid
Declaration
public abstract IGrid SylvesCellGrid { get; }
Property Value
SylvesCellType
Declaration
public abstract ICellType SylvesCellType { get; }
Property Value
Type |
Description |
ICellType |
|
Methods
AddOffset(Vector3Int)
Declaration
public void AddOffset(Vector3Int o)
Parameters
Type |
Name |
Description |
Vector3Int |
o |
|
Get(Vector3Int, CellDir)
Finds the face details for a cell with a given offeset.
Declaration
public FaceDetails Get(Vector3Int offset, CellDir dir)
Parameters
Type |
Name |
Description |
Vector3Int |
offset |
|
CellDir |
dir |
|
Returns
Get(Vector3Int, CellFaceDir)
Finds the face details for a cell with a given offeset.
Declaration
public FaceDetails Get(Vector3Int offset, CellFaceDir faceDir)
Parameters
Type |
Name |
Description |
Vector3Int |
offset |
|
CellFaceDir |
faceDir |
|
Returns
GetSharedMesh()
Finds the mesh associated with this tile, or null
Declaration
public Mesh GetSharedMesh()
Returns
OnAfterDeserialize()
Implement this method to receive a callback after Unity deserializes your object.
Declaration
public void OnAfterDeserialize()
OnBeforeSerialize()
Implement this method to receive a callback before Unity serializes your object.
Declaration
public void OnBeforeSerialize()
RemoveOffset(Vector3Int)
Declaration
public void RemoveOffset(Vector3Int o)
Parameters
Type |
Name |
Description |
Vector3Int |
o |
|
TryGet(Vector3Int, CellDir, out FaceDetails)
Finds the face details for a cell with a given offeset.
Declaration
public bool TryGet(Vector3Int offset, CellDir faceDir, out FaceDetails details)
Parameters
Type |
Name |
Description |
Vector3Int |
offset |
|
CellDir |
faceDir |
|
FaceDetails |
details |
|
Returns
TryGet(Vector3Int, CellFaceDir, out FaceDetails)
Finds the face details for a cell with a given offeset.
Declaration
public bool TryGet(Vector3Int offset, CellFaceDir faceDir, out FaceDetails details)
Parameters
Returns
Implements
UnityEngine.ISerializationCallbackReceiver