Jump to content

How to create resizable texture with separate pieces


Shadow20
 Share

Recommended Posts

I have an idea to make a menu and other components in a game with 3 pieces or images, like a start and an end then a middle piece that will repeat as often as needed to make it as long or tall as needed. I have some difficulty thinking of how to implement it though?

 

If possible, some advice on implementing or anything else is appreciated. Another thought i had was to use a tilesprite with the background then render the frame and text on top of the tilesprite. would this be a better alternative?

 

Thanks in advance.

Link to comment
Share on other sites

I would use the TileSprite approach. It repeats the image automatically, and you don't need to worry about calculating scale values.

 

Do note that the TileSprites do not work with input. When I did something very similar to this, I created an invisible sprite that was the same size as the TileSprite to handle all input.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...