truong-bui / AsyncLoadingScreen

Async Loading Screen is a free and open-source plugin for Unreal Engine. Async Loading Screen allows you to easily configure a Loading Screen System in the project settings, and automatically add a Loading Screen whenever you open a new level, without Level Streaming.
https://www.unrealengine.com/marketplace/en-US/product/async-loading-screen
MIT License
787 stars 99 forks source link

Fix for Loading widget image sequence not working while loading maps. #31

Closed navdownsmash closed 3 years ago

navdownsmash commented 3 years ago

Hey Truong-Bui, Thank you for the plugin. It is very useful and thought of sharing the fix for Image sequence not working while loading the map. The issue was that the ActiveTimers don't run during map load time. How Epic make the SThrobber run during map load is by using the SWidget::Paint function. Since that is a private function and the next best function was the SWidget::OnPaint function. I use that to tick call the SLoadingWidget::AnimatingImageSequence function. I do some nasty const to non-const Don't Do conversions but that is how Epic does it in SThrobber. So should be ok.

Also, I have only tried it for 4.25 hence contributing for that version. I think it should be good for other versions as well but didn't try it.

Hope this helps. Again thank you for such an amazing plugin. Please feel to reach out to me using the email mentioned below for any clarification for the same.

Regards Nav Email: navaneeth_3@hotmail.com

truong-bui commented 3 years ago

Hi @navdownsmash, Thank you very much for the PR.

However, I've tested the plugin versions 4.25 and 4.26 again, the Image Sequence just works fine, I'm not sure why the ActiveTimes didn't run on your project but in my case, this just works.

I think this issue only happened on your project, It's very helpful if you could help me to reproduce this issue. Because this may be an exceptional case, so I wouldn't merge your PR into the main branch unless I can reproduce the issue on my side. Hope you understand, thanks again.

Best Regards, Truong Bui

navdownsmash commented 3 years ago

Hey @truong-bui, Absolutely. I think it happens in huge maps. Will try to make a huge map in a demo project for repo-ing the bug. May take me some time. Will get back to you soon.

Regards Nav

truong-bui commented 3 years ago

Thanks, @navdownsmash, there are some users who reported this issue. I will investigate it, your solution may be the right way.

Best Regards, Truong

truong-bui commented 3 years ago

@navdownsmash I've moved animating Image Sequence into the OnPaint function to avoid it stop working when loading a heavy level. So I closed this PR since I've implemented it my own way, thank you very much for the solution :)

P/S: I think the Active Timer function sometimes stops ticking (especially when loading a heavy map) so that's why Image Sequence doesn't work.