Widget doesn't update it's text nor it's button's style

Hi, I’m having trouble with this bug (?)

Here’s the setup:

INB4: Sorry for grammar errors (English isn’t my mother tongue)

- YouTube <— Bug video showcase

Clean project of the issue:

I have a Widget called “tile” it is added from my grid and to the wrap box and viceversa the problem is when i call an event on each “tile” which changes it’s text variable and color depending of it’s text (after pressing “Shuffle button” ) almost every one changes but some do not, it’s weird the bug only happens after I have put them back to the grid by clicking one of them, the clicked one don’t update anything even if that tile also executed the event.

I’m bad at explaining so i attach images of what my setup be like and a video of the bug in action.

Shapshots requested:

EDIT: Just uploaded a video of the bug here is the link: - YouTube
Be sure to watch it please
Any feedback will be aprecciated.
If need more shapshots just tell me.

No, i hace faced many “None” problems before so I basically every time I use something objet related I put a isvalid node even if it is not needed :]

That is why I’m asking.
In your setup if during the for loop an object is not valid, the loop stops.
It is possible that your forloop is finding a not valid object but has not reached the end of the array, so some letters do not get randomized.

Do a print on the is not valid and see if it’s ever being triggered.

ok, i have just checked it and it does fire indeed, it’s weird shouldn’t it never fire? i mean he checks from 0 to 20, and if the tile is at the grid shouldn’t it be valid?

Well, the tile does fire the event and i know that because i added a text widget that shows me the letters of each tile at the wrap box, when i clicked a bugged p tile after randomizing it showed a “s” but the widget still had a p

Now we are thinking with portals.
It is indeed a bit weird.

You have a randomize function that later calls randomize with the target being Tile.
Are those 2 different functions with the same name? Or it’s the same function?

Yep, two different functions but with the same name, the ‘randomize’ function that you see in the image is GAME HUD’s, it fires on each tile of the grid a randomize function ( the actual randomize) and ‘set rarity color’ function which changes the background color of the tile button depending on the tile letter

Let’s try a different approach. Instead of getting all the children every time you shuffle the tiles, make an array of all tiles on the eventbeginplay and then use the forloop on that array, so it doesn’t run into a problem of not valid, see if that changes anything.

Well, at least using the array it’s “cleaner” and “safer”. But it still doesn’t make a lot of sense. Can you print a screenshot of your randomize inside the tile?

Same result, but never triggers is not valid.
I saw that the tiles that i “moved” ( by ‘add child widget’) to the wrap box don’t randomize when i pressed the button ( do not reflect it) when i move them back to the grid (except the one that i clicked to make this happen) the reflect it and that one i clicked gets bugged for ever.

Btw thanks a lot for your effort on helping me I really appreciate it :slight_smile:

Sure :slight_smile: Here you have:

Also, i have just uploaded a video to youtube of it in action to be able to see it cleaner link: - YouTube PS: not full hd, a bit rushed

Ok let’s see then.

First, if you don’t want to shuffle the letters that you have already selected, you should add a boolean in your tiles that say “Selected” and when you select one you set it’s boolean to true, and then when you press shuffle, you run through the array of tiles and if the tile is selected, you don’t change that one’s letter, changing the selected to false when you deselect them or you press attack.

Second, great fox background :stuck_out_tongue:

Third that’s REALLY weird, the N and the T aren’t changing their display but the E is…
Do a small test, on your Randomize function in the tile, disconnect the branch true from break.

Maybe (just maybe) the loop is breaking instantly and the letter isn’t changing.
See if that does anything. (I’m not entirely sure I understand your random, but test it out)

I do want to the selected ones to change too, always, so i guess i’ll have to put them back to the grid and then randomize because with them selected as you saw, doesn’t reflect it.

Second one:
Good eye, thanks :stuck_out_tongue:

Answer to third one:
If i break the branch true brom break every tile will get (Z) because the loop is setup to be checking each space(?) like this: if the random number ( from 0 to 100) is between 0 and 12.56 the letter set is a E if not, check if it’s between 12.56 and 18.93 it’s and A and so on.
That’s the way i set up the letter with a probabiblity (not full random)

The tiles update perfectly as long they not get gliched

Yes it does exist and that method is ‘binding’ to a variable, trust me i have tried binding it too but still gets bugged ( but i think less). The problem of binding is that is like a ‘tick event’ it is updated every frame ( i think) so it’s not good for performance and i am aming for launching it for mobile so not really a option.

That’s is the reason why at the end of randomize function (tile’s) there is the Set text (text) node.

Don’t worry i’m happy that there is someone trying to solve my problem, i hope someone more ( hopefully staff) gives more information about this problem. Anyway Many thanks :smiley:

Ah ok. But it still wouldn’t explain why it’s not changing on the screen.
Maybe make the widget read the current letter instead. There was a tutorial on setting up ammo that makes the widget read a certain variable from a blueprint.


I’m not even sure if it’s applicable to your setup, I’m not really familiar with Widgets yet so I’m really running out of options, but from your code it seems as if it should update.
Is there any Refresh or Update method built in the widget/text function to force it to update it’s display?

Sorry I couldn’t help you get it right =/

Well no problem.
Best of luck in your project, seems promissing.

Hello XyonFox,

I have a few questions for you that will help narrow down what issue it is that you are experiencing.

Quick questions:

  1. Can you reproduce this issue in a clean project?
  2. If so, could you provide a detailed list of steps to reproduce this issue on our end?
  3. If not, could you provide the project that you are having issues with so that I may take a closer look?

I reproduced a clean project Link: MEGA

it’s quite hard to explain it all but i’ll try.

  1. Create an UMG widget (Tile), with a button and a text component (child to the button)

  2. Create the ‘Main UMG Widget’ with a text box, an uniform grid and a wrap box

  3. The Tile has to be centered to the center (even anchors) It has to have the same funtions and code (blueprints) that the tile of the project has.

  4. On construct of the Main UMG, it has to construct many ‘tile’ widgets and adding to a specific grid row and column, also set a reference of the main hud, column and row on each tile.

  5. Add each of them to the ‘allTiles’ Tile reference array

  6. Make when pressed a tile to switch places between grid and wrap box (by a flip-flop)

  7. Make and array of tile reference which has been clicked by adding them onclicked (that tile) .

  8. Bind the text (previous mentioned at 2) to the text combined of all the active tiles.

i’m so bad at explaining, :stuck_out_tongue: if this isn’t enough to solve it and you need more information please tell me.

Best regards, XyonFox

I couldn’t find any relevant new information of what could be causing it
So… Any news Rudy?

Hello XyonFox,

I was able to reproduce this issue on our end. I have written up a report ( UE-29501) and I have submitted to the developers for further consideration. I will provide updates with an pertinent information as it becomes available. Thank you for your time and information.

Make it a great day

3 years later and the bug still happens, can i get an update to this issue? This bug affects my project and if it doesn’t get fixed i’ll have to look for a work-around. Maybe re-open the ticket?