using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class WeatherUI : MonoBehaviour { [HideInInspector] public Button lastSelectWeather; // Start is called before the first frame update void Start() { } public void OnClickWeather(Button mybutton) { if (lastSelectWeather != null) { lastSelectWeather.enabled = true; } mybutton.enabled = false; lastSelectWeather = mybutton; } }