How to change the width of a Tiled sprite from script? - Questions & Answers - Unity Discussions
Por um escritor misterioso
Last updated 26 abril 2025

I’m making a Health Bar prefab (see screenshot). I use an image of a square that I repeat with Draw Mode set to Tiled to divide the bar into squares. I want enemies with more health to have longer bars with more squares. When I change the Width in the inspector, it works as expected (the bar appears longer or shorter and more squares are added or removed accordingly). However, when I change the width in code, nothing happens. I tried setting SpriteRenderer.size but it doesn’t do anything (th

Feedback - Feature request: selecting multiple sprites in the

Making sense of Unity PPU and compression - Ackadia

How to set sprite size in pixels? - Questions & Answers - Unity

Using Rule Tiles - Unity Learn

Modify pixels per unit of generated sprite (via script

UISprite

2D Tilemap] Change the active tilemap by script - Unity Forum

Unity - Manual: Reducing the file size of your build

pixel - Unity 2D art is blurry - Stack Overflow

c# - Unity: Collider not resizing with Sprite Shape by Script

Bug - Tile sprite changing by themselves - Unity Forum

question about resizing tiles on a tilemap : r/godot