using UnityEngine; using UnityEngine.UI; using UnityEngine.SceneManagement; /// /// Attach to a manager GameObject in "are u sure.unity". /// "yes" = confirm leave lobby and go to main menu. /// "no" = go back to previous lobby scene. /// public class ConfirmLeaveUI : MonoBehaviour { [Header("Optional refs (auto-found by name if null)")] public Button yesButton; public Button noButton; [Tooltip("Scene to load after leaving lobby")] public string mainMenuScene = "main menu asi idk lol"; [Tooltip("Scene to go back to when player presses No")] public string previousScene = "create"; void Start() { if (yesButton == null) { var go = GameObject.Find("yes"); if (go != null) yesButton = go.GetComponent