Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Hey!


Unfortunately, there's no way to replace a quad upon a button press without Rebuilding the whole mesh. (Unless you were to edit the actual mesh directly...) Alternatively, you can use the "info" list to grab the position of the final character in a text mesh and move a sprite renderer to that position! Or, you could call Undraw() and make the text undraw in reverse order so the button disappears first. There's a couple different ways you can achieve this responsiveness!

That said, the code you posted should also work just fine, even if it is a bit heavier than just changing the sprite of a sprite renderer. A lot of STM's overhead at the moment is in-editor... even just clicking away from the massive inspector window will improve performance if it's taking a hit!