Fill a slider with a custom picture

So I’m trying to make a ammo counter (like Halo 3) and I’m trying to achieve this with the slider, but is this correct way? and how Do I make the slider filled with repeating image of a bullet?

I thought halo had the ammo as numbers on the weapons?

it does, but I’m talking about this https://gyazo.com/9e6fc1a2b1f7e11b2ba1530df8717332

Hi, @w4ssup - It’s doable.

Just change the slider Fill item Image Type to “Filled” Fill Method “Horizontal”, Fill Origin “Left” - for example. This works if you have image with full row of repeating pattern. IMO you don’t even need slider, as you could just use image component, but it seems like slider notices this image mode, and moving from 0-1 animates fill.
But if you just have one bullet image, you have to mess with import settings of bullet texture I think, as there is no tiling in settings of UI Sprite, and then set the Fill mode of slider Fill item to “Tiled”.

3 Likes

How does this work?

9598432--1360606--Item Fill UI .jpg