Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

[solved] Set Height/Width of a 3D Super Text Mesh box

A topic by Armel Gibson created May 16, 2018 Views: 506 Replies: 2
Viewing posts 1 to 3
(1 edit)

Heyo~

I just got Super Text Mesh, but I can't find the way to set up the size (width/heigth) of a textbox. I'm not using any UI/Canvas system as I prefer to be working with Sprites than Images, so I can't use the Super Text Mesh UI component.

I used Text Mesh Pro a bit before, and the 3D text objects had a RectTransform instead of a Transform so I could still set a width/height for the box. Is there a way to do it in Super Text Mesh? 

Thanks, cheers! 

Wups I played a bit more with it and what I was looking for was Auto-wrap (for width) and Vertical Limit (for height). Any chance of "Best Fit" taking the Vertical Limit into account?

Developer

Hey!

Yeah, autowrap/vertical limit control the width/height. I'm considering changing those two separate float values to be a Vector2, but I'm not sure if that makes it any more useable? 

If you add a super text mesh component to an object with a RectTransform, STM should automatically switch to UI mode, and use the RectTransform's bounds as the autowrap/vertical limit. Right now, the presence of a rectTransform is the only thing telling STM to act differently when on a canvas, so... that's actually a really good point. I'll see what I can do to make it so autoWrap/verticalLimit can be set with a rectTransform component while managing uiMode in a different way, but it'll be a bit delayed, as I have some bugs to fix first, sorry!


As for vertical best fit, try playing around with different "vertical limit modes" for now? I'll see what I can do to add a best fit mode that considers the vertical limit as well as the autowrap value!

-Kai