Dynamicly sized sprite-based buttons?

So, I was trying to create something similar to this: Phaser - Examples - Buttons - Button Using Texture Atlas

But, I was planning on just having the button textures once with text laid over every instance, my main issue is with if I could “stretch” the button by having a repeating 1px wide “inner texture” and then surround it with the two end pieces to limit the amount of images I have to load. Is this possible? I’ve included an example of what I’m trying to do below.


Can be done with a Render Texture. I think someone has made a plugin for this.

1 Like

Yes! Thank you so much, I found it after a fair amount of digging, I’ll share a link in case anyone else is looking for it.