Seems to be a delay in setting text via a widget using the widget vars

Summary

Unsure what the cause is here I’ve tried so many things but i cant work it out so feel Epic need to check this one out.

When trying to set the text on a widget via the var there is a delay initially then it’ll work as intended after a few seconds

Please select what you are reporting on:

Unreal Editor for Fortnite

What Type of Bug are you experiencing?

UI/Tools

Steps to Reproduce

Create a widget having a var :message mine is called WidgetText
Add the widget to the player at game start ensuring its set to Hidden via .SetVisibility(widget_visibility.Hidden)
Then get the widget for the player and show the widget via
.SetVisibility(widget_visibility.Visible)
Then set text as you normally would with a var

Expected Result

It should work smoothly but for some reason this has a delay

Observed Result

It seems to have some kind of delay

Platform(s)

pc

Additional Notes

I will like a yt video showing im printing the correct string but its not updating the widget as it should but then after a few seconds it seems to work as expected.

Other widgets work as expected but i dont Show/Hide them so unsure if this is part of the issue ?

So the text on the widget starts as Loading initially just for confirmation of that

   ShowLoadingScreenUI(Player:player)<suspends>:void=




        Playspace := GetPlayspace()

        HUDController := Playspace.GetHUDController()

        HUDElementsToHide := array{

            player_hud_identifier_all{},

            creative_hud_identifier_all{}

        }

    

        # Hide all HUD elements

        HUDController.HideElementsForPlayer(Player, HUDElementsToHide)

        Sleep(0.0)

        PlayerWidget := GetWidget(Player, WidgetType.LoadingScreen)

        if(MaybeLoadingScreenWidget := PlayerWidget?, LoadingScreenWidget := MyUI.LoadingScreen.LoadingScreen_Widget[MaybeLoadingScreenWidget]):

            MaybeLoadingScreenWidget.SetVisibility(widget_visibility.Visible) # Visible

            set LoadingScreenWidget.WidgetText = S2M("Loading")

            Sleep(0.1)

            # Animate the loading text with eclipses

            var DotCount :int = 0

            for(Index := 0..10):

                LoadingMessage := MakeLoadingMessage(DotCount)

                Print("Loading Message = {LoadingMessage}")

                set LoadingScreenWidget.WidgetText = S2M(LoadingMessage)

                set DotCount += 1

                if(DotCount > 3):

                    set DotCount = 0

                Sleep(1.0)

            MaybeLoadingScreenWidget.SetVisibility(widget_visibility.Hidden) # Hidden

        HUDController.ResetElementsForPlayer(Player, HUDElementsToHide) # Restore the HUD elements




    # Helper function to create the loading message with dots

    MakeLoadingMessage(DotCount:int):string=

        var Dots : string = ""

        for(I := 1..DotCount):

            set Dots = Dots + "."

        return "Loading" + Dots

Although not a game breaker its weird and would love to know if its me or a bug

When looking at the video its best to pause then move the time with the dial and compare the prints - Top Left with the visual text on the screen via textblock