What Does the Sprite Texture Importer's Extrude Edges Option Do?

When importing a sprite or a sprite sheet there’s an “Extrude Edges” option that says “How much area to leave around the sprite in the generated mesh” when I hover over it with my cursor. The thing is, not matter what the value the meshes of my sprites don’t seem to change when I place them in the scene. The wording of the tooltips makes it seem like setting that value to 1 would add some padding to the sprite’s mesh, which would be useful for writing outline shaders and the like.

Am I just misunderstanding this option, or is it not working as expected?

Thanks.

2 Likes

Just bumping this post. Does no one know why this seems to be behaving improperly to me?

Not claiming to be an expert or anything, but that seems to be exactly how it works in my usage.

I have sprites with transparency around the edges, but the Tight mesh basically removes the transparent region from the sprite as far as the shader can see.

I wrote a custom shader which adds an outline to the transparent regions around a sprite, and so I am able to draw a thicker outline properly by increasing the Extrude Edges option:3133084--237403--extrude edges.png

1 Like

Strange, it still doesn’t seem to do anything for me. Looking at my sprite’s mesh in the scene view in wireframe mode and it doesn’t seem to change at all. Maybe it’s something to do with how my sprites are laid out in my spritesheet.

“Extrude Edges” isn’t doing anything in my case either. Seems like I can use “Tiling and Offset” in Shader Graph to effectively shrink the texture a little bit. So I guess I’ll go that route, though it’s not as ideal.

I have one more thing to look into. I suspect I am not using the right mesh. I may be using a mesh I made myself. Rather than the sprite mesh that Unity generates on import. Meaning I think they’d have different UVs, right?