public static void SetEnabled (GameObject t, bool on){
// en/disables the BoxCollider of the control
BoxCollider[] uielements;
uielements = t.GetComponentsInChildren <BoxCollider>();
foreach (BoxCollider bc in uielements) {
bc.enabled = on;
}
}
public static void Enable (GameObject t){
// enables the BoxCollider of the control and children, fades it in
SetEnabled (t, true);
TweenAlpha.Begin(t, 0.15f, 1f);
}
public static void Disable (GameObject t){
// disables the BoxCollider of the control and children, fades it out
SetEnabled (t, false);
TweenAlpha.Begin(t, 0.15f, 0f);
}