Why my Gui.DrawTexture wont tile texture

I made a simple .png image for my health bar texture, which consists of two green areas divided by black border. So, in my code I calling it with the help of DrawTexture method, but it wont tile!

public Texture2D insideHealthBar;
GUI.DrawTexture (new Rect (newPosition.x + xOffset, Screen.height - newPosition.y + yOffset, width, height), insideHealthBar);

I checked that wrap mode of texture set to repeat, but it still just stretches and looks ugly when im changing width :frowning: What’s wrong?

I attached a example of what Im trying to get…

You would need a UI Canvas, and attached to that a Canvas scalar. You will want to set it to scale to constant physical size. That will keep it the same size in world space as you zoom in and out.

Hope that helps