Executing a long-running code during loading will indeed cause ANR or similar messages. From the OS perspective, your application does not respond to the messages.
We have indeed removed old approach that was calling Application.ProcessMessages periodically during loading. There’s nothing in CGE making it impossible, it was and is possible with our UI… but only on certain platforms, like Windows or other desktops, where we “control the event loop”. It cannot work on platforms like Nintendo Switch, web, or iOS – where this is not possible, we cannot control event loop there, we must obey the “external event loop”: something external tells us to update+redraw.
( It was also somewhat hard to maintain – as necessarily we were making redraws in half-finished state. But I would probably try to keep it, if it was cross-platform. )
Looking at others, Unity also doesn’t have anything like Application.ProcessMessages. Your application only reacts to events (like update, redraw).
So the ultimate solution is as shown in our zombie_fighter. This forces you to split loading code into multiple small steps (and puts responsibility on your side to make these steps “small enough”) and allows to make redraws as the steps progress.
I know, it requires some manual work to make it really work. You cannot just drop a complicated design with scenes, and tick a checkbox “load it with a nice progress bar”
Which would be nice! But it’s just not something we can do right now. I hope to improve it on the engine side, but it’s a more long-term task which we have to figure out.
We will also have asynchronous loading which solve the problem of “making these steps small enough” that I mentioned above. With async loading, your application can remain responsive even when doing longer task.