Skip to main content
Tweeted twitter.com/#!/StackGameDev/status/508491084725768192
invluding image
Source Link
JJ91
  • 11
  • 1
  • 5

Canenter image description hereCan 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.

Can 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.

enter image description hereCan 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.

code formatting and spelling
Source Link
bummzack
  • 22.6k
  • 5
  • 63
  • 87

Unity2d How to make progress bar adapt to various aspect ratioratios in Unity3d

canCan anyone help me please with this problem: I want to make a time progress bar in my game,I. I have two textures: progressBarFrameprogressBarFrame and progressBarprogressBar. If I make it in OnGUI, likeCurrently 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 GUITextureGUITexture 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 ratiosonratios and keeps its position relative to other GameObjects  (that's what I want). But I dontdon't know how to anymateanimate it properly because the figure of the textures is not a simple line.

Unity2d How to make progress bar adapt to various aspect ratio

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.

How to make progress bar adapt to various aspect ratios in Unity3d

Can 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.

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 ); }

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.

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.

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.

Source Link
JJ91
  • 11
  • 1
  • 5
Loading