Skip to content

Archived on 2026-10-24. This is a historical implementation note, not current setup instructions or an active task list. Original claims, code examples, file paths, and completion statements have not all been revalidated. Use the current documentation and issue register for maintenance decisions.

Scene Transition Setup Guide

Overview

This document explains how to set up the Bootloader and MainMenu scenes for the new hyperspace transition system.

Changes Made

1. New Script: SceneInitializer.cs

  • Location: Assets/Script/App/Core/SceneInitializer.cs
  • Purpose: Temporarily disables Camera, AudioListener, and EventSystem in MainMenu to prevent conflicts during transition

2. Updated: SplashUIController.cs

  • Location: Assets/Script/App/Core/SplashUIController.cs
  • Key Changes:
  • Fixed logo sequence to properly display and fade in/out
  • Removed unused gameLogo and landBackgroundTransform references
  • Simplified transition flow: activates MainMenu components → triggers animation → immediately unloads Bootloader
  • Changed logo display time to 4 seconds (faster if input detected)

3. Updated: MenuController.cs

  • Location: Assets/Script/App/UI/Controllers/MenuController.cs
  • Key Changes:
  • Added hyperspace transition system
  • Added StartHyperspaceTransition() method called by SplashUIController
  • Added background management for land → sky → space transition
  • Added particle system support for star streaks during hyperspace

Unity Editor Setup

Bootloader Scene Setup

Step 1: Update SplashUIController Component

  1. Select the GameObject with SplashUIController in Bootloader scene
  2. In Inspector, update the serialized fields:
  3. Logo Images: Drag your Developer and Publisher logo images (should be 2 images)
  4. Land Background: Drag the land background Image (this should match the land background in MainMenu)
  5. Press Any Key Text: Link to your TextMeshProUGUI for "Press Any Key" text
  6. Logos Canvas Group: Link to CanvasGroup containing the logos
  7. Press Any Key Canvas Group: Link to CanvasGroup containing "Press Any Key" text
  8. Main Menu Scene Name: Set to "MainMenu" (or your scene name)
  9. Timing Settings: Adjust as needed:
    • Logo Display Time: 4 seconds
    • Logo Fade Duration: 0.5 seconds
    • Press Any Key Fade Duration: 0.5 seconds

Step 2: Remove Unused References

  • Remove references to gameLogo (if it existed)
  • Remove references to landBackgroundTransform (if it existed)

Step 3: Bootloader Scene Components

Important: Bootloader scene MUST have these components: - Camera (for rendering logos and background) - AudioListener (for audio during bootloader) - EventSystem (for detecting "Press Any Key" input)

These will be automatically unloaded when Bootloader scene is unloaded.


Step 1: Add SceneInitializer Component

  1. Create a new GameObject in MainMenu scene (name it "SceneInitializer")
  2. Add the SceneInitializer component to it
  3. In Inspector, link the components:
  4. Main Camera: Drag the MainMenu's Camera
  5. Audio Listener: Drag the MainMenu's AudioListener
  6. Event System: Drag the MainMenu's EventSystem GameObject

Step 2: Update MenuController Component

  1. Select the GameObject with MenuController in MainMenu scene
  2. In Inspector, locate the new "Hyperspace Transition" section
  3. Link the following:
  4. Land Background: The land background Image (same as Bootloader)
  5. Sky Background: The sky background Image for hyperspace effect
  6. Space Background: The space background Image (final state)
  7. Star Particles: ParticleSystem for star streaks during hyperspace
  8. Land Background Transform: RectTransform of land background
  9. Sky Background Transform: RectTransform of sky background
  10. Space Background Transform: RectTransform of space background
  11. Adjust timing settings:
  12. Hyperspace Duration: 3 seconds (total transition time)
  13. Land Slide Duration: 1.5 seconds (initial rapid slide)

Step 3: Background Position Setup

  • All three backgrounds should be at the same position initially
  • They will be positioned dynamically by the script
  • Ensure they're all children of the same Canvas with proper sorting order

For the star streaks effect: 1. Create a ParticleSystem GameObject 2. Configure for a "star field" effect: - Shape: Box or Cone (emitting downward) - Start Lifetime: 1-2 seconds - Start Speed: High (for hyperspeed effect) - Emission Rate: High - Renderer: Use a star texture/sprite 3. Position it in the scene hierarchy 4. Link it to the Star Particles field in MenuController


How the Transition Works

Sequence:

  1. AppInitiator runs async tasks (services, managers, save loading)
  2. SplashUIController runs logo sequence in parallel
  3. When both complete → "Press Any Key" appears
  4. On key press:
  5. SceneInitializer.ActivateSceneComponents() enables MainMenu's Camera/AudioListener/EventSystem
  6. MenuController.StartHyperspaceTransition() begins animation
  7. Bootloader scene is unloaded immediately
  8. Hyperspace Animation (in MenuController):
  9. Land slides down rapidly (hyperspeed)
  10. Sky appears with star particles
  11. Sky slides down, revealing space
  12. Space settles into position
  13. Menu UI initializes

No Conflicts:

  • MainMenu's components are disabled until the moment of transition
  • Bootloader is unloaded immediately after starting the animation
  • No overlap period with duplicate Camera/AudioListener/EventSystem

Troubleshooting

Issue: "Press Any Key" doesn't appear

  • Check: Ensure both allTasksCompleted and logosCompleted are true
  • Check: Look for Debug.Log messages in console
  • Fix: Verify AppInitiator is calling OnAllTasksCompleted()

Issue: Multiple AudioListener warning

  • Check: Ensure SceneInitializer is properly linked to MainMenu's components
  • Check: Verify MainMenu's components are disabled initially
  • Fix: Re-add SceneInitializer component and link all references

Issue: Backgrounds don't animate

  • Check: Ensure RectTransform references are correct in MenuController
  • Check: Verify backgrounds are active in scene
  • Fix: Check Canvas sorting order (Space should be on top of Sky, Sky on top of Land)

Issue: Star particles don't show

  • Check: Ensure ParticleSystem is linked in MenuController
  • Check: Verify ParticleSystem is properly configured
  • Fix: Adjust particle system settings (emission rate, speed, lifetime)

Optional Enhancements

1. Sound Effects

Add sound effects to the transition: - Hyperspace whoosh sound when stars activate - Landing sound when space settles - Add to MenuController's HyperspaceTransitionCoroutine()

2. Camera Shake

Add camera shake during the hyperspeed phase for more impact:

// In MenuController, during Phase 1
if (mainCameraTransform != null)
{
    mainCameraTransform.DOShakePosition(0.5f, 0.1f, 10, 90f);
}

3. Screen Flash

Add a flash effect when transitioning between backgrounds:

// Flash white
flashImage.DOFade(1f, 0.1f).SetLoops(2, LoopType.Yoyo);


File Reference

Created Files:

  • Assets/Script/App/Core/SceneInitializer.cs

Modified Files:

  • Assets/Script/App/Core/SplashUIController.cs
  • Assets/Script/App/UI/Controllers/MenuController.cs

Documentation:

  • This file: docs/SceneTransitionSetup.md