using UnityEngine; using LoadingScreenBuildPro; public sealed class GuideLoadButton : MonoBehaviour { [SerializeField] private string destination = "SampleScene"; [SerializeField] private LoadingLayout optionalOverride; public void BeginLoading() { if (LoadingScreenBuilder.IsLoading) return; var handle = LoadingScreenBuilder.LoadScene( destination, optionalOverride); handle.Failed += OnFailed; } private void OnFailed(LoadingRequestHandle handle) { if (handle.State != LoadingState.Cancelled) Debug.LogException(handle.Error); } }