I’m wondering if there’s a way to set the fill origin of a UI image at the center. For example I’m trying to make my UI image in my game fill as something charges up so as it charges, the image appears more, but I can only make it fill from the top, bottom, left or right sides of the screen with the fill method being vertical, horizontal,radial etc. Is there some way to set the fill origin of a UI image to the center?
I fixed this by working around it.
Simply cut your image in half and setup two images side to side half the width of your original image. Then set one as ‘left’ and one as ‘right’ and reduce both at the same time.
Kind of a late answer, but I was able to achieve this affect by using a stencil buffer. Basically I animate a growing transparent rectagular image that has a shader on it that writes to a stencil buffer (so if you want to fill from the middle outwards vertically, you’d scale the height… if you want to do it horizontally, you’d scale width… or you could scale both if you want the fill to happen as a square). The UI element that I want to fill has a shader that only renders when a certain value is present in the stencil buffer.