private void OnEnable() { #if !UNITY_EDITOR try { #endif if (removeBind) { var controller = UIManager.Instance.GetController(UIConfig.FieldMineUI); DataModel = controller.GetDataModel("") as FieldMineDataModel; Binding.SetBindDataSource(DataModel); } removeBind = true; EventDispatcher.Instance.AddEventListener(LodePositionSetEvent.EVENT_TYPE, OnPositionSetEvent); #if !UNITY_EDITOR } catch (Exception ex) { Logger.Error(ex.ToString()); } #endif }
public void CleanUp() { DataModel = new FieldMineDataModel(); }