can anyone help me please with this problem: 
I want to make a time progress bar in my game,I have two textures: progressBarFrame and progressBar. If I make it in OnGUI, like

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 texture to it, after adjusting  its size and location as I need, progress bar stretches/squishes with different aspect ratioson and keeps its position relative to other GameObjects(that's what I want). But I dont know how to anymate it properly because the figure of the textures is not simple line.