docs.unity3d.com
    Show / Hide Table of Contents

    Class AnimatedTile

    Animated Tiles are tiles which run through and display a list of sprites in sequence.

    Inheritance
    Object
    Object
    ScriptableObject
    TileBase
    AnimatedTile
    Inherited Members
    TileBase.RefreshTile(Vector3Int, ITilemap)
    TileBase.StartUp(Vector3Int, ITilemap, GameObject)
    ScriptableObject.SetDirty()
    ScriptableObject.CreateInstance(String)
    ScriptableObject.CreateInstance(Type)
    ScriptableObject.CreateInstance<T>()
    Object.GetInstanceID()
    Object.GetHashCode()
    Object.Equals(Object)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, Boolean)
    Object.Instantiate<T>(T)
    Object.Instantiate<T>(T, Vector3, Quaternion)
    Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
    Object.Instantiate<T>(T, Transform)
    Object.Instantiate<T>(T, Transform, Boolean)
    Object.Destroy(Object, Single)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, Boolean)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    UnityEngine.Object.FindObjectsOfType(System.Type, System.Boolean)
    Object.DontDestroyOnLoad(Object)
    Object.DestroyObject(Object, Single)
    Object.DestroyObject(Object)
    Object.FindSceneObjectsOfType(Type)
    Object.FindObjectsOfTypeIncludingAssets(Type)
    Object.FindObjectsOfType<T>()
    UnityEngine.Object.FindObjectsOfType<T>(System.Boolean)
    Object.FindObjectOfType<T>()
    UnityEngine.Object.FindObjectOfType<T>(System.Boolean)
    Object.FindObjectsOfTypeAll(Type)
    Object.FindObjectOfType(Type)
    UnityEngine.Object.FindObjectOfType(System.Type, System.Boolean)
    Object.ToString()
    Object.name
    Object.hideFlags
    Namespace: UnityEngine.Tilemaps
    Syntax
    [Serializable]
    [HelpURL("https://docs.unity3d.com/Packages/com.unity.2d.tilemap.extras@latest/index.html?subfolder=/manual/AnimatedTile.html")]
    public class AnimatedTile : TileBase

    Fields

    m_AnimatedSprites

    The List of Sprites set for the Animated Tile. This will be played in sequence.

    Declaration
    public Sprite[] m_AnimatedSprites
    Field Value
    Type Description
    Sprite[]

    m_AnimationStartFrame

    The starting frame of this Animated Tile. This allows you to start the Animation from a particular Sprite in the list of Animated Sprites. If this is set, this overrides m_AnimationStartTime.

    Declaration
    public int m_AnimationStartFrame
    Field Value
    Type Description
    Int32

    m_AnimationStartTime

    The starting time of this Animated Tile. This allows you to start the Animation from time in the list of Animated Sprites depending on the Tilemap's Animation Frame Rate.

    Declaration
    public float m_AnimationStartTime
    Field Value
    Type Description
    Single

    m_MaxSpeed

    The maximum possible speed at which the Animation of the Tile will be played. A speed value will be randomly chosen between the minimum and maximum speed.

    Declaration
    public float m_MaxSpeed
    Field Value
    Type Description
    Single

    m_MinSpeed

    The minimum possible speed at which the Animation of the Tile will be played. A speed value will be randomly chosen between the minimum and maximum speed.

    Declaration
    public float m_MinSpeed
    Field Value
    Type Description
    Single

    m_TileColliderType

    The Collider Shape generated by the Tile.

    Declaration
    public Tile.ColliderType m_TileColliderType
    Field Value
    Type Description
    Tile.ColliderType

    Methods

    GetTileAnimationData(Vector3Int, ITilemap, ref TileAnimationData)

    Retrieves any tile animation data from the scripted tile.

    Declaration
    public override bool GetTileAnimationData(Vector3Int position, ITilemap tilemap, ref TileAnimationData tileAnimationData)
    Parameters
    Type Name Description
    Vector3Int position

    Position of the Tile on the Tilemap.

    ITilemap tilemap

    The Tilemap the tile is present on.

    TileAnimationData tileAnimationData

    Data to run an animation on the tile.

    Returns
    Type Description
    Boolean

    Whether the call was successful.

    Overrides
    UnityEngine.Tilemaps.TileBase.GetTileAnimationData(UnityEngine.Vector3Int, UnityEngine.Tilemaps.ITilemap, UnityEngine.Tilemaps.TileAnimationData)

    GetTileData(Vector3Int, ITilemap, ref TileData)

    Retrieves any tile rendering data from the scripted tile.

    Declaration
    public override void GetTileData(Vector3Int position, ITilemap tilemap, ref TileData tileData)
    Parameters
    Type Name Description
    Vector3Int position

    Position of the Tile on the Tilemap.

    ITilemap tilemap

    The Tilemap the tile is present on.

    TileData tileData

    Data to render the tile.

    Overrides
    UnityEngine.Tilemaps.TileBase.GetTileData(UnityEngine.Vector3Int, UnityEngine.Tilemaps.ITilemap, UnityEngine.Tilemaps.TileData)
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023