- Home /
Crop/Mask a Sprite on runtime
Im doing some energy bars and, as the shape isn't a rectangle, I can't change the scale (lower than 1) to get the effect of "not full". So I need top mask/crop. I saw a solution using Texture2D (instead of sprite) and the obvious masking solution in the canvas. But there's a way to crop/mask sprites OUTSIDE the canvas and using SPRITES (not Images or Texture2D)?
I tried the solutions provided to Image/Texture2D (using resize; try to resize the rect; etc) but I could do it. It seems that all of that variables are read only on Sprites.
Any idea?
Comment