- Home /
How to do big white outlines on unity UI?
I want to make an outline on some buttons, and these buttons have different shapes. I was doing a test with the Outline component (Add Component > UI > Effects > Outline), and turns out its actually copying the button image four times behind my button and multiplying a color on it. So I can't change this color to white because that would leave these four images as is. Also if I set the effect distance too high (like more than 4), It'll start to become weird.
Here's an image to illustrate
Is there any other solution that I can make an outline the way I want? Something more like the photoshop stroke effect. Something that actually work with the pixels.
Why not just make a second image with an outline. Tell us what you are intending on doing. Is it for changing when mouse is over the ui element or what? Tell us a bit more.
I just want to make a button. The up state is just an image, and the over is the image outlined in white with a little panel with text under. Second image with outline would work good enough I guess, thanks for the idea.
I'm having the same issue. I think outline was intended to work properly with Text not Image. I have not found any good solution so far, but there is this topic on the forum that might help: http://forum.unity3d.com/threads/outline-glow-effect-for-2d-sprite.274188/
Answer by drakmail · Oct 27, 2017 at 07:41 PM
Hackish way - create a clone of the sprite with larger scale (for ex. 1.1) and custom material with GUI / Text Shader shader.
Custom material:
Your answer
