Search Unity

Image Border Overflow

Discussion in 'UGUI & TextMesh Pro' started by CorruptScanline, Feb 24, 2015.

  1. CorruptScanline


    Mar 26, 2009
    There doesn't seem to be an overflow feature for sprites and the Image UI component. This would be really useful for UI elements that have shadows baked in.

    Heres what I get:

    Heres what I want (Ignore the anchor gizmos):

    Heres the sprite setup:

    Is there any way to achieve this, without complicating the RectTransform hierarchy?

    Ideally there would be an Overflow field in the sprite editor that lets you set how many pixels you want to extend outside of the RectTransforms bounds.
  2. SimonDarksideJ


    Jul 3, 2012
    Other than what you have done above (having an image inside an empty GO), I don't think it's possible currently.
    You would have to create your own version of the Image control to do this, should be fairly easy though based on the Image control's source in the UI bitbucket repo.

    If you do create one, feel free to contribute it to the UI extension project (link below)