Decals or UI to generate dynamic Nametags on surfaces?

Right now I am using Decals to generate a new Texture to place nametags on top of doors.

It is a huge amount of code to generate it, it works now, but i need create lots of instances for each texture created, Bitmap, Graphics, ImageConverter, Fonts, Texture2D, etc, etc.

It is a pain to customize it, and I have to generate these textures for each door on both sides, well at least I do it once per Load, or unless the player decide to edit the tag, which he can by clicking it, then it generates again.

I was considering using UI and I want to know if a static UI in World is more performant.

It will be a lot of canvases around everywhere, is it ok?

Since the player can build in this game, i can’t say a number of doors, it can be plenty, or minimal depends on the player, but at least 4 if he only uses 1 piece which means 8 canvases.

Also there is a possible dynamic UI usage, making a moving display like a LED display hehe but I am more concerned with a static UI at the moment, with the user editing the text if he wants to change the tag, which with UI is much easier, by just changing the Text field. :slight_smile:

Thanks :smile:

You do know that there’s a “text mesh” component which creates a floating text without a canvas… right?

Unity’s TextMeshPro plugin also a has a text mesh component that has a few more features than the built-in text mesh. Either way there’s no need for a UI canvas, these components render a flat mesh that you can place in your scene.

Perfect, thanks a lot guys, also sorry for not answering quick, was busy :stuck_out_tongue:

I bet it is way better than dealing with Bitmap rendering in runtime and then making that into a Decal. Urgh. :frowning: