Search Unity

distort GUI.Box rect shape?

Discussion in 'Scripting' started by Dwaring28720, Sep 22, 2014.

  1. Dwaring28720

    Dwaring28720

    Joined:
    Sep 20, 2014
    Posts:
    10
    hi, i dont know what the simplest method of doing this is, but is there a way of altering a a rectangles shape? ive got a health bar but im bored with it being a simple rectangle so i was hoping to have the box taper off on 1 side ... something along the lines of "Left height=50" "right height=20" "width=100", i hope that makes sense :)

    GUI.Box(new Rect(100,100, 100,20), "HP");

    thanks for any help on this
     
  2. Suddoha

    Suddoha

    Joined:
    Nov 9, 2013
    Posts:
    2,824
    Textures with alpha channel would be one way to go.
     
    Dwaring28720 likes this.