CanCan anyone help me with this problem:
I want to make a time progress bar in my game. I have two textures: progressBarFrame
and progressBar
. Currently I'm doing the following:
void OnGui() {
GUI.DrawTexture ( Rect(x,y,width,height), progressBar );
}
It works, but it doesn't adapt to different screen sizes.
I also tried this: Create GUITexture
in the hierarchy and add a texture to it, after adjusting its size and location as I need, progress bar stretches/squishes with different aspect ratios and keeps its position relative to other GameObjects (that's what I want). But I don't know how to animate it properly because the figure of the textures is not a simple line.