public void SetActiveButton(bl_AttachButton t) { if (t == null) { if (ActiveButton != null) { ActiveButton.Active(false); ActiveButton = null; } return; } if (ActiveButton != null) { ActiveButton.Active(false); } ActiveButton = t; ActiveButton.Active(true); }
/// <summary> /// /// </summary> void ShowTextButton() { if (Customize) { Ray ray = m_Camera.ScreenPointToRay(Input.mousePosition); RaycastHit hit; if (Physics.Raycast(ray, out hit, 1000)) { bl_AttachButton atb = hit.transform.GetComponent <bl_AttachButton>(); if (atb != null && atb != Button.ActiveButton) { Button.SetActiveButton(atb); } } else { Button.SetActiveButton(null); } } }