Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+2)

Awesome asset!  I've been using this for awhile, but I will say that alot of folks buying/making art for tiles are going to wind up with some of your RPG Maker standard 1232 animation tiles.  Since this doesn't reconcile that I've added a bit of code.  Since Unity slices sprites left to right, top to bottom you build your animated tilesets vertically rather than horizontally (which most artists do).  So frame 1 animations go at the top, frame 2 animations below ALL of the frame 1 animations, and so on.

To TerrainAutoRuleTile.cs class add these:

[SerializeField]
bool use1232Animation;
[SerializeField]
int spritesPerAnimationSet;

And in the for loop in the OverrideRuleTile() method add this to the bottom of the for loop:

if(use1232Animation && RuleTileTemplate.m_TilingRules[i].m_Sprites.Length == 4)
{
  _new.m_TilingRules[i].m_Sprites[1] = sprites[i + spritesPerAnimationSet];
  _new.m_TilingRules[i].m_Sprites[2] = sprites[i + (spritesPerAnimationSet * 2)];
  _new.m_TilingRules[i].m_Sprites[3] = sprites[i + spritesPerAnimationSet];
}