x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

UMG/Widget decreasing FPS?

Hi!

I have a very annoying issue, when I use widget my frame rate drastically decreasing! From 120 to 3 FPS...someone mayby tell me why? I have enough of it. Please help!

Product Version: Not Selected
Tags:
more ▼

asked Dec 17 '14 at 06:28 PM in Blueprint Scripting

avatar image

Killedge
36 6 14 19

avatar image Erasio Dec 17 '14 at 10:00 PM

What exactly are you doing inside of it?

A simple 2d widget itself does hardly affect the framerate at all. I didn't had a chance to test the 3d once but I can not imagine it having such an impact either.

Could you explain a bit further how you set it up?

Like how you spawn it and what it does. Ideally with pictures.

Cheers

avatar image Killedge Dec 19 '14 at 06:53 PM

Hi Erasio

This is a link to my Unreal Project - https://www.dropbox.com/sh/oiy24k3mdxmqgfp/AADNDO1tItPZyOO-ftwpDAeHa?dl=0

Simple scene and simple widget. But my fps slowing down very quickly from 120 to 0.13? I not have a clue why... Please help

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

Oh yea I see.

"Event Receive Draw HUD" is an event which will be called each frame.

You draw the texture and then (remember still each single frame) create a widget and add it to the viewport. That means in the beginning you spawn 120 widgets per second. Each one will be rendered each frame. You see where this is going right?

For this you could for example use "Event Begin play" which will be called only once at the beginning.

I hope this helps.

Cheers

more ▼

answered Dec 19 '14 at 08:29 PM

avatar image

Erasio
5.9k 291 86 293

avatar image Killedge Dec 19 '14 at 10:38 PM

Now It works flawless! Thanks Erasio you saved my life! But I've one more question... I try to setup a inventory - scrollbox with item boxes, I've done whole blueprint (one for scrollbox, one for button and I use a Froeachloop to add a child to scrollbox, but when I try "event begin play" its don't display anything on screen... Do you have any ideas?

Cheers!

avatar image Erasio Dec 20 '14 at 12:27 AM

Where do you call your "Event Begin play"?

Inside of a widget you would want to use "Event construct".

Could you upload a picture of what exactly you're talking about? It's a bit hard to guess in which bp you have all of this and what exactly you did ;)

avatar image Killedge Dec 20 '14 at 11:19 AM

Like I said two widget, one for scrollbox and one for itembox. In scrollbox blueprint I create a function to add a item box. At least I use a "event begin play" and nothing display on screen, but when I plug this to "event recieve draw HUD" its working but like you said its isnt a correct way to do this.

alt text

alt text

alt text

alt text

hud.jpg (628.8 kB)
add item.jpg (706.4 kB)
scrollbox.jpg (624.7 kB)
itembox.jpg (490.7 kB)
avatar image Erasio Dec 20 '14 at 11:47 AM

First of all you don't have to cast your widget to the specific one. You can put the output of your "Create widget" directly into "Add to Viewport".

And is it really working with "Draw HUD" like you'd expect? The only explanation I have for this is that you don't update the slots and the inventory you're referencing is empty when event begin play is called...

avatar image Killedge Dec 20 '14 at 07:21 PM

Okey, thats make a sense... but how can I update my widget? I was trying but nothing seems to be properly.

avatar image Erasio Dec 20 '14 at 07:42 PM

If you want to modify the widget you will have to store a reference after you created it and work with that.

Or do everything inside of your widget. You could add the buttons to an array and check each tick if something changed in the character and then add / remove something if something has changed.

There are a couple of different approaches and especially in your very first projects you will find a dozen things which you would do better or different after you've worked quite a bit with the engine. You should just try what you think should work right now and then try to figure out why it doesn't. You're actually learning a whole lot from that ;)

avatar image Killedge Dec 21 '14 at 01:35 PM

I've done some tests and now I clearly know what is wrong. Whole function in widget is good but function in my pickup system is wrong, because don't update the viewport when I pickup some item. Thats why I dont see nothing in my scrollbox. I must refine/rebulid my pickup function.

Cheers

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

lol I had the same problem with 4.13. And all the versions. Try to use Text Render components instead of UMG. That should make the things a lot better. Good luck! ~Michael

more ▼

answered Feb 23 '17 at 07:59 PM

avatar image

Midsoft Games
56 1 3 11

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question