Author Topic: Really simple count down with Fill Amount (sprite)  (Read 1283 times)

bezii

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 19
    • View Profile
Really simple count down with Fill Amount (sprite)
« on: January 17, 2014, 04:16:09 PM »
Hi guys,

I am testing my GUI and i would really like to see how the progress bar works in a game. Do you have a really basic/simple count down for 360 fill amount sprite?

Thanks.
« Last Edit: January 18, 2014, 09:19:11 AM by bezii »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Really simple count down with Fill Amount (sprite)
« Reply #1 on: January 17, 2014, 11:30:48 PM »
UISprite.fillAmount lets you set the fill given a 0-1 range value.
For example this will set the fill amount to 50%:
  1. UISprite sp = GetComponent<UISprite>();
  2. sp.fillAmount = 0.5f;