using UnityEngine; using UnityEngine.UI; using UniRx; public class CreationPanel : UIView { public Text TitleText; public Toggle CreateToggle; public Button SaveButton; public Button ClearButton; public override void Awake() { base.Awake(); //创建 CreateToggle.OnValueChangedAsObservable() .Subscribe(value => CloneObject(value)).AddTo(gameObject); ClearButton.OnClickAsObservable() .Subscribe(_ => EquipmentManager.Instance.OnCleraButtonClicked()); SaveButton.OnClickAsObservable() .Subscribe(_ => EquipmentManager.Instance.SaveData()); transform.Find("TitleBar/CloseButton").GetComponent