Accessing "fill amount" for UI elements via C#

Hey Guys,

I feel like this is a stupid questions, but I have found zero documentation on this. I’m trying to adjust the fill amount for a UI Image based on external variables - I’m making a fuel bar. The only thing I could find is a report of a bug when you put the fill value to 0 via a script so I knew it’s possible!

Please help.

Also if there is a resource somewhere that I’m missing (I’ve searched the Manuel and the Scripting API and I have found nothing) please fill me in!

Thanks,

You didn’t look very far in the docs. Note you have to use the 4.6 docs, not the standard ones.

UI.Image.fillAmount