@farshad great, thanks.
Do you have any idea when you would do the tutorial you mentioned on adding a new weapon type?
(SOLVED) Hi, The item description text either stopped working or isn’t being displayed anymore. I tried debugging it, and the text is being passed correctly from the actor to the typewriter.
In the end, in the Event Update Screen code, it goes into both the True and False paths of the Update Description branch. It looks like the False path always runs after the True one, because when I disable the False path, the text stays visible, but it doesn’t update when I switch slots.
I have a feeling the text was working before, but it stopped after I changed the design of the inventory elements. The strange thing is that I didn’t touch the actual code.
And it works in storagebox.
Okay, I found the cause, but I still don’t really understand why it happens. look at image , This is what prevents the text from working.
I added it as a safeguard so that the inventory scales consistently on any screen and keeps the same aspect ratio, but I don’t understand how that could affect the text.
By the way, it looks like the text animation in the asset was made in a pretty complicated way. In Unreal, there’s a much simpler way to achieve the same effect using just a couple of nodes and variables. This is how I did it for another project.
So, based on what I found on the forums, it looks like this is an Unreal bug. ChatGPT suggested a cleaner way to preserve the aspect ratio across different screen formats.
This is important, for example, for players using a square monitor or an ultrawide display. In the current setup(clean asset), the inventory layout will start breaking: elements will shift around and get compressed. You can see this yourself by running the game in the viewport, opening the inventory, and then narrowing the window with the mouse.
Fortunately, the fix is pretty simple.
On the Canvas Panel, wrap the content in a Size Box, and then add another Canvas Panel inside that Size Box(wrapping too).
Then select the Size Box and set its anchor to the bottom-right preset. After that, open the anchor settings again and choose the center point so that the X and Y Position values appear.
Set both position values to 0 so the interface is centered. Enable Size to Content, and set Alignment to 0.5 / 0.5.
Then enable Width Override and Height Override and set them to 1920 and 1080.
After that, add the code from the attached screenshot to Event Construct.
Now, whenever you open the inventory, it will have the correct size regardless of the window dimensions.
Yes, if you resize the window in real time while the inventory is already open, the layout will break again. But that’s not really a problem, since nobody is going to resize their monitor in real time. And if they somehow do, simply reopening the inventory will fix it.
If you still want it to update continuously in real time, you could run this code on a timer, but I think that would be unnecessary.
@g-honorgames Thanks for the detailed update and for sharing your findings.
I’m glad you were able to identify the cause and get it working again. The solution you shared will definitely be helpful for others as well, and we’ll take a look at it on our end too.
Thanks again for the detailed explanation!
@ben4886 I will try to get back to the tutorials for both frameworks after the release of MSHF v0.5
We have been extremely busy with development during this period and unfortunately haven’t had much time for tutorials. Once v0.5 is released, I’m hoping to continue them again.
@farshad no problem, if you are able to send me some screenshots to point me in the right direction, I’ll give it a go myself
@ben4886 Hey Ben, I made a video for you that shows the complete process step by step. I hope you find it helpful! I’ve also added the video to the documentation so it can hopefully be useful to others as well 🙂
https://www.youtube.com/watch?v=9m-cI1PENcA