How to implement a loading screen for a procedurally-generated level?

Hello! I’m sorry if this is a stupid question, but I’m stuck.

I’m doing a game with procedurally-generated levels and I’m looking for the right way to show the loading screen while while objects are being created on the scene.

I use one scene for all levels - it is initially empty and begins to fill in the function Awake (). Therefore, a separate loading scene with the LoadSceneAsync function isn’t suitable for this case, because it ends before Awake().

My choice: show a loading image on top of the scene on which the level is pre-generated and hide it when the content is downloaded. Is this a correct approach? Are there any other options?

Please help or suggest a direction in finding a solution to my problem. Thank you in advance!

Your approach is correct for your case. Since you have only one scene you can’t use LoadSceneAsync method. So show a loading image as a separate prefab and the load the level prefab. Once it is loaded invoke a callback to close the loading image. In this process you can show some progress animation in the Loading image slowly and finish the progress animation as soon as the Close Loading method is triggered and close the loading after the loading is complete.

@lvladgd