Removing Verse UI

@editable HideBudgetUI : trigger_device = trigger_device{}
    
    var BudgetButtonMap : [agent]?button_quiet = map{}

    Convert<localizes>(S:string):message="{S}"

    AssignBudgetUI(Agent:agent):void=
        MyCanvas:=MakeCanvas(Agent)
        if:
            PlayerUI:=GetPlayerUI[player[Agent]]
        then:
            PlayerUI.AddWidget(MyCanvas)
            spawn{RefreshUI(Agent)}

    RefreshUI(Agent:agent)<suspends>:void=
        loop:
            if:
                PlayerBudget := BudgetPerPlayer[Agent]?
            then:
                if(ButtonQuiet := BudgetButtonMap[Agent]?):
                    Sleep(0.0)
                    ButtonQuiet.SetText(Convert("Budget Left: {PlayerBudget}"))
                if(CloseShop = 1):
                    break

    MakeCanvas(Agent:agent):canvas=
 
        BudgetLeftWidget := button_quiet{}

        if(set BudgetButtonMap[Agent] = option{BudgetLeftWidget}){}
 
        MyCanvas:=canvas:
            Slots:=array:
                canvas_slot:
                    Anchors := anchors{Minimum := vector2{X := 0.5, Y := 0.0}, Maximum := vector2{X := 0.5, Y := 0.0}}
                    Offsets := margin{Top := 100.0, Left := 0.0, Right := 0.0, Bottom := 0.0}
                    Alignment := vector2{X := 0.5, Y := 0.5}
                    SizeToContent := true
                    Widget:=BudgetLeftWidget
        return MyCanvas

How can I remove this UI, I found a tutorial for it but it didn’t include removing it and now I’m stuck

This doc gets into it:
PlayerUI.RemoveWidget()

This also should help as well.
The RIGHT Way To Code UEFN Multiplayer In Verse & Custom Fortnite Player Characters (youtube.com)

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.