Readding to viewport retriggers everything
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?
<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?
Re: Readding to viewport retriggers everything
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.
Re: Readding to viewport retriggers everything
Hi,
Could you create a ticket for this problem? I have a patch for you to try.
Thanks!
Could you create a ticket for this problem? I have a patch for you to try.
Thanks!
Who is online
Users browsing this forum: Ahrefs [Bot] and 5 guests