How is possible to insert a gun image on the UI by code?

I am trying to show a list of weapons in the top of the screen by Verse, but I did not find documentation about it in UI module

Objetive:

I found a slider and the classic text_block, but nothing related to imgs.

 CurrentLevelWidget<internal> : text_block = text_block{DefaultTextColor := NamedColors.White} 
    LevelSliderWidget<internal> : slider_regular = slider_regular{DefaultMaxValue := 30.0, DefaultMinValue := 0.0}

Unfortunately, Verse UI does not currently support images. BUT you can use HUD message device and set a HUD widget to show. You’d create the widget by right clicking on the content browser and in the User Interface tab.

It seems a solution, but I think there is another way to do it. If I need to create a gun game o someting similar I need to create about X HUD for each gun so the project will be to heavy

What do you mean you “think” there is another way to do it? I guess you could also use a post processing node like Lilith here: https://twitter.com/ix_lemon/status/1640890865177567233?s=20

1 Like

Oh, that cool, but I don´t know how it can help me, if I want to put an Image in the center top of the HUD and rotate to others in-game. I will give it a try.

You may just need to have loooooots of hud message devices that will replace that icon as you go through the weapons.

That is one option that I though, but in that way there will be so many Widget Blueprints in the project that this will be no posible to run as every UI is about 24 MB, if you create 1 UI for each gun the Gun Game will be too heavy to players to enter quickly

Workaround idea. If you can get static meshes for the guns, arrange them in a hidden room, ill call “UI Room”. Place the gun in a circle and parent them to a hidden mesh in the center of the circle so the guns all turn when you turn the parent.

Then set up a simple cinematic with a cinematic camera for each gun so that when you reach that gun level, the cinematic plays for the proper gun, then teleports you back to player. Flashy

just use smaller image files. even if u could show the image with verse, wouldn’t it take up the same 24 mb?

Hi dmac921. Sorry for my late response, it seems as a creative idea but I do not undertand what do you mean exactly, could you explain me?

Thanks :heart: