Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Adding images above text

A topic by rangerpowerx created Mar 01, 2025 Views: 200 Replies: 10
Viewing posts 1 to 3

Making new topic for this, so you told me to use quads right? how can i use quads to load png icons above name? example, this is the method of my name:


Pastebin

Developer

Well, in the previous thread, I gave you some code that shows how to dynamically load emoji from file based on the filename. You can use that same method to load whatever images you want dynamically, or just define a new quad as I also told you how to do if you don't need dynamic loading. 

Your example code is already using a lot of custom classes, which I asked you for more details on before and did not receive (I don't know what UTM_StaticData is), so I'm not sure how much I can help beyond what I've already done! This code is unreadable to me without additional context, I can't make sense of "method_15", "Boolean_0"... Not only are they not in the context of the script you sent, I can't infer what they are meant to represent based on those names. 

Okay, i will show you, this is UTM_StaticData, its just STM_StaticData with name changed and so:

https://pastebin.com/Y1AtYWwf

And this is the class when i did show you that code before for nicks (Nickname_Controller):

https://pastebin.com/e7B2Y8nm

Developer

Yeah I'm sorry, but I don't think I can say that much more on this custom system of yours... The compiler-generated code is impossible for me to figure out, and I can only really give support on my own code... I fully support writing your own extensions, but apart from how to write the implementation, I can't help further than that!

So... if you can load custom emoji as quads, you can load any image as a quad! If you go through the emoji code, what you can do is take the part that looks for an emoji based on file name, and adapt it to load whatever image in a Resources folder as a quad. When you grab the image as a Texture2D, you can even use the dimensions to determine the size of the quad.

And I'd still recommend just using a standard image/spriterenderer for this if your banner is on a different row, anyway! That way, you can just skip applying it to a quad, and put it right on an image renderer.


Just did it!!

 


No need to complicate when you can call the icons above the title :p


Developer

Yeahh, exactly... if it's just icons, once you've got a layout group like that, you just set the icon as the sprite being rendered. I see why you wanted to use STM for it  now though, I thought you just wanted one wide banner above the player name!

(4 edits)

By the way, is it possible you can add my game to the list of games that use SuperTextMesh?

Match3D 

https://match3d.space

Developer

I'll think about it, but sorry but I don't really have explicitly adult games on there... Not against it or anything, it just might be an unexpected surprise among all the others, so I'm not sure what to do. 

Not really adult game, it's true you can do adult stuff but its mostly a social game where you can have parties with djs in real time, build your world, adult stuff is always optional, but up to you!

Developer

I see, I've gone ahead and added it!

Thank you!!