Class AnimatedTile
Animated Tiles are tiles which run through and display a list of sprites in sequence.
Inherited Members
Namespace: UnityEngine.Tilemaps
Assembly: Unity.2D.Tilemap.Extras.dll
Syntax
[Serializable]
[HelpURL("https://docs.unity3d.com/Packages/com.unity.2d.tilemap.extras@latest/index.html?subfolder=/manual/AnimatedTile.html")]
public class AnimatedTile : TileBaseFields
m_AnimatedSprites
The List of Sprites set for the Animated Tile. This will be played in sequence.
Declaration
public Sprite[] m_AnimatedSpritesField 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_AnimationStartFrameField Value
| Type | Description | 
|---|---|
| int | 
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_AnimationStartTimeField Value
| Type | Description | 
|---|---|
| float | 
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_MaxSpeedField Value
| Type | Description | 
|---|---|
| float | 
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_MinSpeedField Value
| Type | Description | 
|---|---|
| float | 
m_TileAnimationFlags
Flags for controlling the Tile Animation.
Declaration
public TileAnimationFlags m_TileAnimationFlagsField Value
| Type | Description | 
|---|---|
| TileAnimationFlags | 
m_TileColliderType
The Collider Shape generated by the Tile.
Declaration
public Tile.ColliderType m_TileColliderTypeField 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 | 
|---|---|
| bool | Whether the call was successful. | 
Overrides
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. |