mshvern23
Topic Author
Posts: 35
Joined: 22 May 2023, 02:00

Readding to viewport retriggers everything

09 Feb 2024, 03:45

Hi! In my game I'm using a lot of the following pattern.

<b:Interaction.Triggers>
<b:PropertyChangedTrigger Binding="{Binding DataContext.MyGame.game_state, ElementName=Root}">
<b:GoToStateAction StateName="{Binding DataContext.MyGame.game_state, ElementName=Root}" />
</b:PropertyChangedTrigger>
</b:Interaction.Triggers>

When I'm switching levels, I'm forced to do an AddToViewport on the main widget. Everything is functional, the only problem is retriggering all of the animations that arrive at the current state because the above triggers are all triggered again. Is there's anything I can do to disable that behavior on re-adding to viewport?
 
mshvern23
Topic Author
Posts: 35
Joined: 22 May 2023, 02:00

Re: Readding to viewport retriggers everything

10 Feb 2024, 04:02

In the meantime, if anyone has the same issue, the necessity to AddToViewport itself can be resolved if you comment out OnLevelRemovedFromWorld in UGameViewportSubsystem in the source of the Unreal Engine. If you want the widgets to be destroyed together with the UWorld they were created with, this is of course not an option.
 
User avatar
hcpizzi
Site Admin
Posts: 321
Joined: 09 Feb 2012, 12:40

Re: Readding to viewport retriggers everything

16 Feb 2024, 16:28

Hi,

Could you create a ticket for this problem? I have a patch for you to try.

Thanks!

Who is online

Users browsing this forum: No registered users and 5 guests