Is it possible to use this in the GUI layer somehow?
Shaun's Nine Slice
A downloadable asset pack
Create boxes of arbitrary size based on any sprite partitioned into 9 even segments.
Sprites with minimum edge & center detail can use the "stretch" version to achieve precise / animated results.
Just two basic scripts, check out my free tutorial video and learn how to put this together yourself, avoiding any need to buy! (But if you liked it and the work I do, maybe consider buying it or supporting my work on Patreon!)
In order to download this asset pack you must purchase it at or above the minimum price of $2 USD. You will get access to the following files: