How to fit texture behind text to be the same size as text without stretching the texture.

Hey, I have a problem that I’m not sure what’s the best way to solving it is.
I already have a solution, but I want to know how good/bad it is.

So essentially, I want to put text in front of a texture, and that texture increases in height the longer the text is.
But I want to do this without resizing the texture, because that would cause stretching, and would make the texture itself look bad. (as if it’s low quality.)

I have found a possible solution.

Which essentially makes the image tileable, with a direction.
But, if I use a wrong texture, it could end up like this:
image

Instead what I actually want is something like this:

The only problem is that it seems I need to have 3 different textures.
a header, a body, and a footer.
But it “Almost” seems like that’s complicated, or it’s a few extra steps.

Maybe I’m the one who thinks it’s over-complicated, but it could turn out to be actually the only way, or the best way, and that’s what I want direction from.
(Also yes I’m aware I’ll most likely be using a scale box on the text)

So, is there another better way to do this?
If so, please elaborate.
Or should I go with this way I mentioned?

Setting Image States part.

Sorry but maybe I’m missing it…
Like yeah I see the part you’re talking about, but I don’t get how it’s helpful in my situation.
I think it’s just general knowledge…

Though since you’re referencing this, it almost seems like you know exactly what steps I need to do.
(If you actually do) please tell me.

(If you don’t) then I’d like to hear your opinion regarding the solution method I proposed in my post.
Is it relevant? is it good/bad idea to solve this?

Thanks for the interaction btw!

You need to make a texture for UI.

Test Picture:
9d8ba8bc0476acadd9fd6c13ed325739388ae72d

Texture Settings:
Texture Group - UI
Compression Settings - UserInterface2D (RGBA)

Then, set backgroud “Draw As” to box.

“Draw As” as Image:

“Draw As” as Box:

1 Like

Hey, sorry for the long delay, I had to actually try this out and see if it works, and finish the task I had.

This was in fact exactly what I needed, thanks a lot!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.