Hi there,
I am trying to solve this thing now for hours but I keep failing. Ive been digging through other Threads but somehow I havent found a solution yet
So here is what I am trying to do. I am working on an ArchViz and what I want are slightly interactive objects that change their material. There is a tooltip at the top that describes the customer what to do. I basically have the material part, I am stuck at the UMG Part :/.
So what shall happen on the screen is that there is a ToolTip which says âclick space to show interaction triggersâ after that it shall say âchoose Triggerâ and finally once you click on the trigger a little menu pop up menu with several mat options appears and the text says âchoose Materialâ. And the last text change, i do not get to work.
Of course in the end I want to have the same logic on basically more objects
The 1st image shows the object blueprint of my test vase, in addition I get a an Error message:
âError Accessed None âUMG_Main_Tooltipsâ from node SetText (Text) in graph âEventGraphâ in blueprint BP_bosa_cut_vase_collection_mediumâ
Not sure why I do get it here since I am pointing to my UMG_Main_Tooltips widget :/. How and where do I give this the information it needs?
2nd is the Widget itself
3rd is the level blueprint
Since I am quite a noob here, maybe I am also having a complete wrong apporach? I saw some threads that focus on text binding etc but I have no idea on how I could use it here.
I hope you can help me.
refer EventBeginPlay LvlBP: the first thing you should do is when creating your widget save it in a variable and then add it to viewport.
refer OnClicked (interaction trigger event): The same here when you create your widget save it in a variable. And to remove it from parent use that variable instead
of dragging the pin from your create widget, which will be zero, since the node never gets fired when trying to remove.
Just to be explicit give your Create Widget a PlayerController.
Confusion:
you create your UMG_Main_Tooltips widget and dont save it, but where is your variable UMG Main Tooltips (inside your red-marked area) coming from?
Hi . Thank you for your answer. I think I am a step further. So i saved the widgets in Variables. My problem is that I cannot access the Widget Variable in my object.
(The UMG Main Tooltips in my red marked area was a Variable with Type Object Reference to my Widget, which stays empty)
So I need to get my Main_Tooltips Variable from my LvlBP somehow to my Object. But my Object does not know it. And that makes me sad
Hi thx for the quick answer.
I explain a bit more in Detail. I am creating my Widget in the level. The Tooltip has always something in it. At first "Press Space for interaction triggers " (of several objects, furniture etc). This gets called by an EventDispatcher in the player. Then the triggers appear above the objects. Once you click on a trigger of the object it shall change the text again. Im not sure what kind of BP Type I have here. I just took a static mesh and edited the BP so I suppose it is a Static Mesh Actor (dont laugh if it is wrong, you are educating a noob here ;))
Edit:
Hm I think I am thinking this wrong. I want to send text to Textbox 105. So I need to communicate with the Widget Blueprint (see 1st post).
hmmm, direct communication between lvl and actor could be kind of tricky.
I dont quite know if there is a proper way to do this, except some ugly hacky ways.
However, since you have interactable objects in the world and each of them shall display a tooltip what you can do with it, i think the best is to
set up a tooltip text variable inside each of those.
Now, when the player enters is in range to interact with the object, the tooltip should appear. So f.e. create your tooltip event inside the PlayerController BP
and read the text out of the interactable object-> and set it to your blueprint´s textwidget.
For this you would need to replace your event dispatcher with a proper OnHit event or BeginOverlap or whatever.
Tbh⌠i would avoid creating widgets inside the level blueprint.
Hm I see. So 1st I create the widget in the Character that is no problem. Somehow i would like to try to keep my control setup though. You see when I press Space for the 1st time I âdisableâ the camera mouse input so that the cursor can take care of choosing materials etc⌠I think with your idea, wouldnt I still have the problem that I have to send text to a widget, only in this case from the player instead from an actor. This is what I dont get. I think I am actually currently trying to get a connection between an actor and Widget. I am creating an object Reference Variable of my Target Widget but that thing is not âvalidâ and I get âaccessed noneâŚâ. So I probably have to do something in my Widget. I simplified the actor BP for less confusion