Hello there! I am a newbie to unreal engine and its interfaces and I was trying to use the collab view template in the architecture section I want to know “Where is the code by which the widget was showing on the screen” as I press SpceBAr because I want to change it from spacebar to simple always showing widget icon but I am unable t find it but there are lots of blueprints and logics
And Actually in the unreal doc, it says that it is handled by the interaction menu but I m not able to find it also…
So can you help me to find that Where IS the code/logic by which the widget was showing on the screen???
o/
I’ll give you general hints on how to debug any widget from any project !
You can easily ‘get to’ any project widget at runtime (while playing), or engine widget (editor UI widgets directly in editor) with Widget Reflector
just press: Ctrl Shift W (in UE5)
or from top menu: Tools → Debug → Widget Reflector The new window will appear with handy way to inspect any widget which is currently visible on screen.
Then, for interactive widgets click: Pick Hit-Testable Widgets
and click on widget You want to inspect. Hierarchy with highlighted widget being one You’ve clicked will appear. From there You can navigate to source of widget by clicking on it Source column, or check where it lies in hierarchy to further inspect where it could be coming from.
You can also view widget details, to see them show: Window → Details
For non interactive widgets click three dots menu and choose:
then repeat what I said.
Also usually Widgets are drawn in common places like (for BP projects):
HUD actor. Check Your WorldSettings. (Window → World Settings).
If custom class was specified for HUD in game mode inspect it. Good chance it might be initialised there.
If no custom HUD class is visible or widget not there, check GameMode itself, PlayerController etc.
Lastly check Level Blueprint
Good chance widgets might be in one of these places
but now that i have found out that I’m having an issue in adding another widget in its interaction menu as I wanna change my wall material and want that option to be shown in that interaction menu
ANY HELP???
right now it shows its own menu option in that but now I wanna add my choice option and remove some like scale but I don’t how ?? cause it is way more complicated for me
So do you know how to?
There is a Contextual_Widget widget blueprint containing Activate VB WrapBox widget. It’s children (buttons) get dynamically added at runtime by running Add Child to Wrap Box method on it.
This is done in BP_BaseCommandComponent so each component inheriting from it adds it’s own button widget to it.
Now to delete some buttons you can modify those child components not to add buttons.
To add new custom button you can make your own component and specify a button widget to add, or (if it doesn’t have to be dynamic) just directly add button to WrapBox in Contextual_Widget wrapbox named Activate VB
thank you so much @UnrealVerseGuru for your reply but can you be more specific as I added my button in it and add some blueprints but it doesn’t show on a contextual menu in the viewport
so if you add your buttons dynamically - make sure it happens after the clear, re-add them after the clear or remove clearing all together for this particular button you add
If you do not need to have them exactly in Activate_VB WrapBox you might want to add the button to the VerticalBox it resides in (red arrow)
This way you won’t have to modify the script dealing with clearing that happens
How would you go about creating a new, dynamically created button (the same as the others). Or even remove existing ones from the context menu? I can see they get compiled into an array of object references but can’t find how to edit that, or where to look. Sorry - UI newbie.
Hey just saw that and had the same problem. Noticed that you have to add the component to the base pawn and or VR Pawn depending on where you want the button to be otherwise it wont be found by the get component by class node and therefor not added.