🗺️ LoadingManager

LoadingManager – Component Overview

The LoadingManager handles smooth scene transitions with a loading screen, progress bar, and animated "Loading..." text. It ensures the game does not instantly cut between scenes and provides feedback to the player.


🎮 What It Does

  • Displays a loading screen UI while switching scenes

  • Shows loading percentage and animated dots

  • Waits for a minimum display duration to improve UX

  • Supports audio playback during loading

  • Uses Unity's SceneManager.LoadSceneAsync() with safe scene activation


🔧 Editable Public Fields

UI Elements

  • loadingText – Displays the "Loading..." text and percentage (supports translation).

  • UILoading – The container GameObject for the entire loading screen.

  • loadingProgressBar – UI slider showing loading progress visually.

Settings

  • minimumLoadingTime – Minimum time (in seconds) the loading screen must stay visible, regardless of how fast the scene loads.

Audio

  • loadingAudioClip – Optional sound effect to play while loading.

  • Loadingtag – Tag used by AudioManager to control the playback group.


🔁 How to Use It

Load a Scene

To start loading a scene with UI:

LoadingManager.Singleton.StartLoadSceneWithLoadingScreen("SceneName");

This method will:

  • Activate the loading screen

  • Play the loading audio (if defined)

  • Simulate a minimum loading duration

  • Update a progress bar and text

  • Asynchronously load the target scene


ℹ️ Notes

  • The component uses DontDestroyOnLoad to persist between scenes.

  • The LanguageManager is used to support translated loading text ("loading_loading" ID).

  • The dots (...) are animated by time and reset every 0.5 seconds.

  • You can safely modify the loading visuals (slider style, font, layout) as long as references remain assigned.


This manager is ideal for providing a professional feel during gameplay-to-minigame transitions or any scene switch within the project.

Last updated