Quick answer: Rule order is top-down, first-match wins. Place specific corner rules at the top of the rules list. Use This on the three required neighbors and Not This or Don’t Care on the rest. After editing, Refresh All Tiles to invalidate cached choices.
Your stone wall RuleTile renders horizontals, verticals, and the center fill, but every corner shows the “single brick” default. The rule for “corner” exists; another rule is winning first.
The Symptom
RuleTile-driven tilemap shows correct sprites for straight runs but wrong sprites at corners or T-junctions. The corner sprite is in the rule list but never appears in the Game view.
What Causes This
RuleTile evaluates the list of rules top-to-bottom. The first rule whose neighbor pattern matches the cell’s neighborhood wins, and the engine moves on. A more general rule earlier in the list (e.g. “Same neighbor on left”) matches before your specific corner rule (“Same on left + Same on top + Empty diagonal”).
The Fix
Step 1: Order rules from specific to general. Open the RuleTile asset. Drag corner and junction rules to the top. The default fill rule (everything Don’t Care) goes last.
Step 2: Set neighbor states explicitly. The neighbor matrix has 8 cells. For a top-left outside corner:
NW: Don't Care N: Same NE: Don't Care
W: Don't Care [center] E: Same
SW: Don't Care S: Same SE: Same
That rule says: I have neighbors below, right, and southeast. Match this and use the corner sprite.
Step 3: Refresh. After saving the asset, RuleTile needs to invalidate cached results. Right-click the Tilemap in the Hierarchy → Refresh All Tiles. Or in code:
tilemap.RefreshAllTiles();
Tile Animation
Animated RuleTiles add a frame array per rule. The first match still wins for choosing which animation. Same ordering principle.
Sibling Tiles
If your “same” should also include neighboring tile types (grass next to dirt should still produce a smooth corner), use a custom RuleTile subclass overriding RuleMatch with your own predicate. Or use Tilemap Extras’ Sibling Group attribute to let multiple RuleTiles consider each other “same.”
Verifying
Paint a small test grid: one cell, then a 2x2, then an L. Compare what renders to what your rule list says. Mismatches usually trace to rule order. Move the most-specific rule up; refresh.
“Specific rules first. Refresh after edit. Corners snap into place.”
Related Issues
For TilemapCollider2D edges, see collider edges. For sprite sort flicker, see sprite sort.
Order specific to general. Refresh. Tiles join.