docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class RuleEntityIdTile.TilingRule

    The data structure holding the Rule information for matching Rule Tiles with its neighbors.

    Inheritance
    object
    RuleEntityIdTile.TilingRuleOutput
    RuleEntityIdTile.TilingRule
    Inherited Members
    RuleEntityIdTile.TilingRuleOutput.m_Id
    RuleEntityIdTile.TilingRuleOutput.m_Sprites
    RuleEntityIdTile.TilingRuleOutput.m_GameObject
    RuleEntityIdTile.TilingRuleOutput.m_MinAnimationSpeed
    RuleEntityIdTile.TilingRuleOutput.m_MaxAnimationSpeed
    RuleEntityIdTile.TilingRuleOutput.m_PerlinScale
    RuleEntityIdTile.TilingRuleOutput.m_Output
    RuleEntityIdTile.TilingRuleOutput.m_ColliderType
    RuleEntityIdTile.TilingRuleOutput.m_RandomTransform
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.Tilemaps.Experimental
    Assembly: Unity.2D.Tilemap.Experimental.dll
    Syntax
    [Serializable]
    public class RuleEntityIdTile.TilingRule : RuleEntityIdTile.TilingRuleOutput

    Fields

    m_NeighborPositions

    • Preset this list to RuleEntityIdTile backward compatible, but not support for HexagonalRuleEntityIdTile 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
    Type Description
    List<int>

    m_RuleTransform

    The transform matching Rule for this Rule.

    Declaration
    public RuleMatchSerializable.TransformMatch m_RuleTransform
    Field Value
    Type Description
    RuleMatchSerializable.TransformMatch

    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 RuleEntityIdTile.TilingRule Clone()
    Returns
    Type Description
    RuleEntityIdTile.TilingRule

    A copy of the TilingRule.

    GetBounds()

    Gets the cell bounds of the TilingRule.

    Declaration
    public BoundsInt GetBounds()
    Returns
    Type Description
    BoundsInt

    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

    ToRuleMatchInput(ref RuleMatchInput)

    Copies the TilingRule to a RuleMatchInput struct for use with Unity Jobs

    Declaration
    public override void ToRuleMatchInput(ref RuleMatchInput input)
    Parameters
    Type Name Description
    RuleMatchInput input

    RuleMatchInput to copy to

    Overrides
    RuleEntityIdTile.TilingRuleOutput.ToRuleMatchInput(ref RuleMatchInput)

    ToRuleMatchOutput(ref RuleMatchOutput)

    Copies the TilingRule to a RuleMatchOutput struct for use with Unity Jobs

    Declaration
    public override void ToRuleMatchOutput(ref RuleMatchOutput output)
    Parameters
    Type Name Description
    RuleMatchOutput output

    RuleMatchOutput to copy to

    Overrides
    RuleEntityIdTile.TilingRuleOutput.ToRuleMatchOutput(ref RuleMatchOutput)
    In This Article
    Back to top
    Copyright © 2026 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)