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
gameLogoandlandBackgroundTransformreferences - 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¶
- Select the GameObject with
SplashUIControllerin Bootloader scene - In Inspector, update the serialized fields:
- Logo Images: Drag your Developer and Publisher logo images (should be 2 images)
- Land Background: Drag the land background Image (this should match the land background in MainMenu)
- Press Any Key Text: Link to your TextMeshProUGUI for "Press Any Key" text
- Logos Canvas Group: Link to CanvasGroup containing the logos
- Press Any Key Canvas Group: Link to CanvasGroup containing "Press Any Key" text
- Main Menu Scene Name: Set to "MainMenu" (or your scene name)
- 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.
MainMenu Scene Setup¶
Step 1: Add SceneInitializer Component¶
- Create a new GameObject in MainMenu scene (name it "SceneInitializer")
- Add the
SceneInitializercomponent to it - In Inspector, link the components:
- Main Camera: Drag the MainMenu's Camera
- Audio Listener: Drag the MainMenu's AudioListener
- Event System: Drag the MainMenu's EventSystem GameObject
Step 2: Update MenuController Component¶
- Select the GameObject with
MenuControllerin MainMenu scene - In Inspector, locate the new "Hyperspace Transition" section
- Link the following:
- Land Background: The land background Image (same as Bootloader)
- Sky Background: The sky background Image for hyperspace effect
- Space Background: The space background Image (final state)
- Star Particles: ParticleSystem for star streaks during hyperspace
- Land Background Transform: RectTransform of land background
- Sky Background Transform: RectTransform of sky background
- Space Background Transform: RectTransform of space background
- Adjust timing settings:
- Hyperspace Duration: 3 seconds (total transition time)
- 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
Step 4: Particle System Setup (Optional but Recommended)¶
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:¶
- AppInitiator runs async tasks (services, managers, save loading)
- SplashUIController runs logo sequence in parallel
- When both complete → "Press Any Key" appears
- On key press:
SceneInitializer.ActivateSceneComponents()enables MainMenu's Camera/AudioListener/EventSystemMenuController.StartHyperspaceTransition()begins animation- Bootloader scene is unloaded immediately
- Hyperspace Animation (in MenuController):
- Land slides down rapidly (hyperspeed)
- Sky appears with star particles
- Sky slides down, revealing space
- Space settles into position
- 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
allTasksCompletedandlogosCompletedare 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.csAssets/Script/App/UI/Controllers/MenuController.cs
Documentation:¶
- This file:
docs/SceneTransitionSetup.md