A downloadable tool



TileMap Auto Rule is a little tool to speed up your workflow if importing new Tilemap using Rule Tile in Unity.




Installation



Method 01 - Install package via git URL :


You can install the tool directly in the Package Manager in your Unity project by adding it from the git URL using this URL : https://gitlab.com/pandaroo-public/auto-rule-tile.git


Method 02 - Unity package: 

You can download the Unity package directly on this page and import everything on your project.




How it works



Instead of creating a new Rule Tile, you can choose Auto Rule Tile and new options will appear in the inspector.


The new options. Insert your Tilemap and choose your template or leave the default one.

If you choose an existing rule tile, it will be override with the new template and tilemap.

If you leave Override Existing Rule Tile, a new Rule Tile will be created with the same name of the AutoRuleTile asset.

Click Build Rule Tile and voilà ! Your new Rule Tile is already configured.



Included tilemap template



Even if you can create your own template to adapt to your workflow, don't hesitate to use my own template that is already included in the project.

The Tilemap template (you can scale to the resolution you want)

Example of a Tilemap with the template


Here's what it looks with the template and the tilemap included :



StatusIn development
CategoryTool
Rating
Rated 4.8 out of 5 stars
(11 total ratings)
AuthorsAlex Pandaroo, PandarooInteractive
Made withUnity
Tags2D, import, Pixel Art, rule-tile, Sprites, Tilemap, tool, Unity

Download

Download
AutoRuleTile.unitypackage 22 kB

Development log

Comments

Log in with itch.io to leave a comment.

I have compiled some fixes and made the asset work on the latest versions of Unity. Since the license doesn't allow me to redistribute the asset, I would like to send you my fixes so you can update it here. Hit me up if you're interested

Deleted 103 days ago

I'll send them since there isn't an update for this out yet.

This is finally updated. 

Thanks for kicking my butt via mail, probably was needed :p

(+1)

Is there a way to get 2 different auto-tiled tilesets to connect with each other?

like having a snowy tile connect to a grass tile and getting them to connect like this

Will it work on non pixelart textures? Like higher resolutions?

(+1)

I think as long as it follows the template it should scale

(1 edit)

Awesome work man!  Works perfectly for me, have to make sure to uncheck the 2d extras folders and get the 2d extras preview package through the package manager, and then only import the tilemapautorule folder from this package.  

Update : build error because the %if UNITY_EDITOR's #end_region is inside the class rather than outside it.

(2 edits)

thanks man

it seems cool and i want to use it but i keep getting errors when i open it the error is:

Assets\TileMap Auto Rule\2d-extras-master\Assets\Tilemap\Brushes\Coordinate Brush\Scripts\Editor\CoordinateBrush.cs(9,36): error CS0246: The type or namespace name 'GridBrush' could not be found (are you missing a using directive or an assembly reference?)

it appears 29 times at different spots in the script, im on version 2019.4.6f1 of unity, is there a fix?

I had the same problem.

I found a fix! delete the included 2d-extras master, and then download the 2d-extras from https://github.com/Unity-Technologies/2d-extras. After you put this in the packages file, it should work!

(1 edit) (+3)

This is a great tool! It's saved us a lot of time.  However, something in TerrainAutoRuleTile.cs is keeping us from making a build of the game.

Here is the error:

Assets\TileMap Auto Rule\Scripts\TerrainAutoRuleTile.cs(62,1): error CS1022: Type or namespace definition, or end-of-file expected

It's probably a simple fix, it's just that my smol brain is having a bit of trouble.  We are in Unity 2019.4.5f1.

I found a fix!

In the TerrainAutoRuleTile.cs script, there's this:

(some code)}

#endif

}

Just switch the "#endif" with the bracket at the bottom.

}

#endif

Like that!  Working without a hitch now.  Thanks for the awesome tool!

(+2)

Oh Jesus Thanks!!!!!!!

If u wouldn't write this message i would explode!!!

Thanks a ton, really cool!!!

(+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];
}

Wow - that's a huge time saver. I also wanted to create my one script to just do that.

Thanks!!

Awesome!  I was just about to write my own when I thought "Maybe some excellent person has already done this?"

Good job ;D

Beautiful tool bro👌