Skip to main content
itch.io
Browse Games
Game Jams
Upload Game
Developer Logs
Community
Log in
Register
Indie game store
Free games
Fun games
Horror games
Game development
Assets
Comics
Sales
Bundles
Jobs
Tags
Game Engines
Super Text Mesh
»
Community
Viewing post in
Inline Image (Quad) Help
← Return to Unity Asset community
KaiClavier
4 years ago
(1 edit)
Hey!
Using an array of sprites isn't *naturally* supported, each one would have to be manually defined (or the STMQuadData objects could be generated with a script!), or combined into the same sprite sheet!
Here's how a quad is set up... this is inside of the textdata inspector, after clicking on the [T] in the top-right of STM's inspector window.
"cross" is the name of the quad (used for the tag, <q=cross> or <quad=cross>), "GameButtons" is the texture/sprite being used. Columns and rows represent how many sprites are on the texture. If your texture only features one sprite on it, these values can be left at 1 and you can skip straight to adjusting size/offset/advance.
Here's where it gets a bit more complex... "Icon Index" represents which sprite in the sheet will be used. It starts counting from the bottom-left cell, going to the right, then wrapping up to the next row above. Here's a quick illustration of a 5x3 grid, the values inside each cell are the corresponding index.
So now you're probably thinking... well, this is going to be annoying! I want to use an index to grab a specific cell in this sheet, and I don't want to define 15 different quads!
But there's an extra feature in the quad tag! If you do "<q=cross,1>" the 1 will override the Icon index and go with whatever is in the cell corresponding to "1" instead! So it would display the circle sprite instead of the cross. You can also do <q=cross,1,1> to get an icon at a specific x and y position on the sprite sheet.
...I really should put more of this data in the docs! I wrote the quads section a long time ago and I think this is way more descriptive...
Let me know if you have any further questions, I hope this helps!