0

I'm working on something that relies on the fill amount of the image.

However, the fill amount may be weighted slightly? I'm unsure. Here is my evidence:

This is the amount set to 0.2 http://puu.sh/xirum/1ca62e1e52.png However, setting it to 0.1 shows https://puu.sh/xirx6/b7c35b56cb.png

I would have thought that 0.1 would have shown half of 0.2. Does unity therefore actually measure fill amount from 0.1 -> 1, instead of 0 -> 1 as the documentation suggests, or am I just being stupid?

mayo
  • 3,845
  • 1
  • 32
  • 42
Dwarph
  • 43
  • 1
  • 10
  • what type of fill are you using in the inspector? – ZayedUpal Aug 24 '17 at 15:10
  • Vertical, from the bottom – Dwarph Aug 25 '17 at 18:25
  • Unity calculates fill amount from 0 -> 1 as the document suggests. Please confirm that you are actually assigning the desired value by printing logs and by looking at the assigned value in the inspector. Also make sure that you check this at run-time. Always expect some glitches from unity while while not running. – Anas iqbal Mar 26 '18 at 07:47

1 Answers1

0

Think I know the answer to this one.

I am assuming your image may not be clipped to the edge, and you have a transparent boarder? Also ensure the image is a power of 2 when you import it, as forcing a power of 2 in the texture import settings could also introduce a boarder.

Having a board would mislead you into thinking nothing it showing up until 0.1, when infact it is showing the transparent boarder.

Daniel
  • 629
  • 6
  • 17