Better way to add text to a inspect system

Hello all,

I have a inspect system, where I click, the object go close to the player view, and I can rotate this object, and when leave the inspect mode, this object back to his original location in the world…
I have a raycast, and when he hit a object he cast to another BP, who have a static mesh only… then I can roate this object … I have another system but instanced of use Cast to Blueprint he use Actor has a Tag node…

Now Im trying to add some kind of text support, like the image below, in the image, when you click “spacebar” the UI are replaced with text, to be better to read (image from the game Layers of Fear).

My question is, what is the best way to add this kind of text support, if you have example more then one “inspectable” objects with different text in your project ?

Thanks

You can create an editable text variable in your inspectable object blueprint where the text can be stored. Any instance of the object you place in the level will then have its own text property, which can be found in the details panel and changed just like the location or rotation. This variable will also be inherited by any child blueprints, so if you create specialized inspectable objects (bloody notes, bullet casings, and so on) they will have their own inspection text variables, as long as you set the original inspectable object blueprint as the parent.

This variable can then be accessed in any of your blueprint scripts that work with the inspectable object. For example, a UI widget could get the value of the inspection text variable from the inspected object, and set the content of a text widget using the value that is returned.

IS there any problem with just adding Text (for multi language support insted of string) variable to inspectable object class with text and simply display with UMG or least good old HUD canvas?

Thanks to reply Shadowriver.
So this is what I have in the BP_MasterInspectObject

123366-c510e9a60a6e853c6e8bd99b41b9a7e9.png

Are you talk about the “TextRender” component? If yes, I tried add the TextRender component, but I cast the inspect at the blueprint, so if I rotate the object (from the BP_MasterInspectObject) this will rotate the TextRenderer too.

(gif showing the inspect)

Today I just think about create a Widget blueprint, add a “Text Block” … call this Widget BP inside the BP_MasterInspectObject and change the text from the “Text Block” inside the BP_MasterInspectObject…

Because I will only duplicate this BP_MasterInspectObject and change the mesh and the text inside him…

But I dont know how to change the text in the Text Block from another blueprint… or if this is a good way to do this kind of stuff

Thanks to reply Civility_Reigns.
I add the editable text variable in the inspectable blueprint, but I try to look at internet how to do what you say and also I have tried without success.

What I have to connect in the editable text variable? and how can access the editable text variable inside the Widget Blueprint Text Box? Because I dont see any option to add text in the editable text variable

Again thanks to reply

Okay people, here I show how I did this: :slight_smile:

de nada :smiley: