/* * TITLE SCREEN TROUBLESHOOTING STEPS * ================================== * * Your title screen shows visual effects (hover, click) but doesn't load scenes. * This suggests the UI is working but scene loading is failing. * * STEP-BY-STEP DEBUGGING: * ====================== * * 1. VERIFY BUTTON SETUP: * - Add this component to your TitleScreenManager GameObject * - Play the game and check Console for button detection messages * * 2. TEST SIMPLE SCENE LOADING: * - Add SimpleTitleScreenTest component instead of TitleScreenManager * - This will test basic scene loading without complications * * 3. CHECK CONSOLE MESSAGES: * - Look for "NEW GAME BUTTON CLICKED" messages * - Look for scene loading errors * - Look for "Scene exists" confirmation * * 4. VERIFY BUILD SETTINGS: * - Use context menu "Check Scene Setup" on this component * * LIKELY CAUSES: * ============== * * ❌ Scene loading is called but target scene has errors preventing load * ❌ MainTeamSelectScene is corrupted or has script errors * ❌ Missing dependencies in MainTeamSelectScene * ❌ Build Settings cache needs refresh * */ using UnityEngine; using UnityEngine.UIElements; using UnityEngine.SceneManagement; public class TitleScreenDiagnostics : MonoBehaviour { [Header("Diagnostic Results")] public bool uiDocumentFound = false; public bool buttonsFound = false; public bool sceneInBuildSettings = false; public bool eventHandlersAttached = false; private void Start() { RunDiagnostics(); } [ContextMenu("Run Full Diagnostics")] public void RunDiagnostics() { Debug.Log("=== TITLE SCREEN DIAGNOSTICS ==="); // Check UIDocument var uiDoc = GetComponent(); uiDocumentFound = uiDoc != null; Debug.Log($"✓ UIDocument found: {uiDocumentFound}"); if (!uiDocumentFound) { Debug.LogError("❌ No UIDocument component found!"); return; } // Check buttons var root = uiDoc.rootVisualElement; var newGameBtn = root.Q