using UnityEngine; using UnityEngine.UIElements; using UnityEngine.SceneManagement; using System.Collections; public class LoadingScreenController : MonoBehaviour { private UIDocument _doc; private Label _loadingText; private VisualElement _spaceship; private int _dotCount = 0; private float _time = 0f; [Header("Configuración de Carga")] public string sceneToLoad = "SampleScene"; private void Awake() { _doc = GetComponent(); var root = _doc.rootVisualElement; // Forzar que el TemplateContainer raíz ocupe toda la pantalla root.style.flexGrow = 1; root.style.width = new Length(100, LengthUnit.Percent); root.style.height = new Length(100, LengthUnit.Percent); _loadingText = root.Q