Search Unity

Dynamic, Hollow Outline

Discussion in 'UGUI & TextMesh Pro' started by blitzen, Jun 4, 2019.

  1. blitzen

    blitzen

    Joined:
    Sep 4, 2011
    Posts:
    51
    Hi, I have a dialogue window that is to be translucent with a partial-alpha value as the background, then a Text element as its child:

    upload_2019-6-4_9-2-52.png

    The background size will fluctuate due to a Content Size Fitter, while the outline will want to remain a constant thickness, and at the same time allow for the image it encapsulates to see through partially.

    The "Outline" effect script seems to blit a solid black rectangle behind the image, and is possible to make the outline just as translucent; hwoever we want to keep the outline a solid black with a full alpha value of 1. I've tried nesting an intermediate Image with the alpha totally off and an Outline independently solid, so that it sits on top - this only seems to blit the larger black rectangle to cover up the white translucent one behind it entirely.

    Does more robust solution spring to mind?

    Thanks.