using UnityEngine; using UnityEngine.UI; using TMPro; /// /// Attach to a manager GameObject in host lobby.unity. /// Reads radius from the "radius" slider/input and triggers CreateLobby. /// Also wires the "vytvořit" button. /// public class HostLobbyUI : MonoBehaviour { [Header("Optional refs (auto-found by name if null)")] public Slider radiusSlider; public TMP_InputField radiusInput; public Button createButton; void Start() { if (radiusSlider == null) { var go = GameObject.Find("radius"); if (go != null) radiusSlider = go.GetComponent(); } if (radiusInput == null) { var go = GameObject.Find("radius"); if (go != null) radiusInput = go.GetComponent(); } if (createButton == null) { // Try all name variants used by the Art team var go = GameObject.Find("stvo\u0159it") // stvořit ?? GameObject.Find("stvorit") ?? GameObject.Find("vytvo\u0159it") // vytvořit ?? GameObject.Find("vytvorit"); if (go != null) { createButton = go.GetComponent