Class RuleTile.TilingRule
The data structure holding the Rule information for matching Rule Tiles with its neighbors.
Inherited Members
Namespace: UnityEngine
Assembly: Unity.2D.Tilemap.Extras.dll
Syntax
[Serializable]
public class RuleTile.TilingRule : RuleTile.TilingRuleOutput
Fields
m_NeighborPositions
- Preset this list to RuleTile backward compatible, but not support for HexagonalRuleTile backward compatible.
Declaration
public List<Vector3Int> m_NeighborPositions
Field Value
Type | Description |
---|---|
List<Vector3Int> |
m_Neighbors
The matching Rule conditions for each of its neighboring Tiles.
Declaration
public List<int> m_Neighbors
Field Value
m_RuleTransform
The transform matching Rule for this Rule.
Declaration
public RuleTile.TilingRuleOutput.Transform m_RuleTransform
Field Value
Type | Description |
---|---|
Rule |
Methods
ApplyNeighbors(Dictionary<Vector3Int, int>)
Applies the values from the given dictionary as this Tile's neighbors
Declaration
public void ApplyNeighbors(Dictionary<Vector3Int, int> dict)
Parameters
Type | Name | Description |
---|---|---|
Dictionary<Vector3Int, int> | dict | Dictionary to apply values from |
Clone()
This clones a copy of the TilingRule.
Declaration
public RuleTile.TilingRule Clone()
Returns
Type | Description |
---|---|
Rule |
A copy of the TilingRule. |
GetBounds()
Gets the cell bounds of the TilingRule.
Declaration
public BoundsInt GetBounds()
Returns
Type | Description |
---|---|
Bounds |
Returns the cell bounds of the TilingRule. |
GetNeighbors()
Returns all neighbors of this Tile as a dictionary
Declaration
public Dictionary<Vector3Int, int> GetNeighbors()
Returns
Type | Description |
---|---|
Dictionary<Vector3Int, int> | A dictionary of neighbors for this Tile |