private static bool ProceedLayoutAndButton(string layoutName, string buttonName, bool probeOnly = false) { GUIBase_Layout layout = MFGuiManager.Instance.GetLayout(layoutName); if (null != layout) { if (layout.IsEnabled(true) && layout.IsVisible(false)) { GUIBase_Widget widget = layout.GetWidget(buttonName); if (null != widget) { if (widget.IsEnabled(true) && widget.IsVisible(false)) { if (!probeOnly) { m_CoroutineRunning = true; if (null != Game.Instance) { Game.Instance.StartCoroutine(AutoClick(widget)); } } return(true); } } } } return(false); }