using UniRx; using UnityEngine.UI; public class SecondMenuPanel : UIView { public Text MainText; public Button HomeButton; public override void Awake() { base.Awake(); HomeButton.OnClickAsObservable() .Subscribe(_ => MainMenu.Instance.OnHome()); } }