Virtual Pet Game Template
  • VIRTUAL PET GAME TEMPLATE
  • Getting Started
    • 🎯 Project Setup Guide
    • 🧩 Home Scene Overview
    • 🗺️ UI Main Menu
    • 🗺️ LoadingManager
    • 🗺️ GameInstance
    • 🗺️ ToolsManager
    • 🗺️ AudioManager
    • 🗺️ LanguageManager
    • 🗺️ MonetizationManager
    • 🗺️ PlayerSave
  • Modifying the project
    • 🐾 How to Add a New Pet
    • 📜How Add a New Pet Rules
    • 💰 How to Add a New Currency
    • 🍎 How to Add a New Food Item
    • 🧢 Adding a New Accessory
    • 🎮 How to Add a New Minigame
  • Modifying Minigames
    • 🌤️ Minigame "Jump Sky"
    • 🍔 Minigame "Food Flicker"
    • 🐦 Minigame “Flappy”
    • 💎 Minigame “Gem Hunter”
Powered by GitBook
On this page
  • 🎮 What It Does
  • 🔧 Editable Public Fields
  • 🔁 How to Use It
  • ℹ️ Notes
  1. Getting Started

🗺️ 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.

Previous🗺️ UI Main MenuNext🗺️ GameInstance

Last updated 28 days ago