Is [Print String] hardcoded in the UE engine (or some .ini file?) to only display in the top left of the screen or can it be repositioned?
Howdy ash22,
The Print String node is hardcoded to only appear in the top left corner of the Editor Viewport. You can however use Text Render to place text in different locations.
Let me know if any more information is needed. Thanks and have a great day!
Thanks ,
Do you have a direct link to the official Text Render usage description?
If I type in a ‘Text Render’ search into the Unreal Engine 4 Documentation
webpage (Unreal Engine 5.2 Documentation | Unreal Engine 5.2 Documentation) I get a hundred forum related posts.
Hi Ash,
is talking about the Draw Text function of a HUD blueprint. You can find a tutorial on it here:
And you can see it in action in the Content Example map Blueprint HUD. There is a little more information about it here:
https://docs.unrealengine.com/latest/INT/Resources/ContentExamples/Blueprints_HUD/1_1/index.html
Using that you would be able to determine the position the words are draw. I hope that this helps you, please let us know if there is anything else we can do to assist you.
Cheers,
Thanks very much, it works great. I’m not sure what Text Render does differently, but DrawText does exactly what I want.
The tut example didn’t quite work ‘as is’ for me as I am using a class Blueprint (and the tut uses a level blueprint). I did, however get it to work by first casting to my HUD object type in order to access members for the DrawText call.
On the subject of casting, do casts have to be used with moderation in Blueprint or are they relatively penalty free (performance wise?)
“Text Render” was what I told to tell you initially, but later found it was actually called “Draw Text”, so I came back to clarify the mistake.
Casts are relatively low in cost, but you would not want to do a Cast To on tick or anything that would be extremely frequent. It would work on Tick, but it would not be an optimal usage.
Personally I use casting for a lot of things, since it is a very simple way for Blueprints to communicate. I am cautious about it though and store any values I would need to get multiple times instead of casting multiple times.
I wish I could just give a hard number like “Casting is 100 points more than using a Blueprint Interface”, but it is hard to gauge these kinds of things.
Let me know if that helped or if you need any further assistance.
Thanks again , that was useful info.
I was actually using casts for the very same reason you mentioned, i.e. I find it easier/faster to setup inter-blueprint-comms with a simple than a Blueprint interface. However, I’m still new to UE4 and ‘best practice’ so not sure if I should make it habitual. Nonetheless, I have noted the ‘cast per tick’ caveat.
Anyway, sorry for going off-topic on to casts. I will post a separate question next time.