using System; using UnityEngine; namespace com.workman.cm3d2.button { public class ButtonEnable { public ButtonEnable(UIButton uiButton, BoxCollider collider = null) { this.uiButton = uiButton; this.collider = collider; } public void SetEnable(bool enabled) { if (this.collider != null) { this.collider.enabled = enabled; } if (this.uiButton != null) { this.uiButton.enabled = enabled; } } public UIButton uiButton; public BoxCollider collider; } }