public void enableFakePanel() {
GameObject.Find("PanelFake").GetComponent<UIPanel>().enabled = true;
GameObject.Find("PanelFake").GetComponent<UIPanel>().widgetsAreStatic = false;
UISprite[] spriteChilds = GameObject.Find("PanelFake").GetComponentsInChildren<UISprite>();
foreach (UISprite child in spriteChilds) {
child.enabled = true;
}
UIButton[] buttonChilds = GameObject.Find("PanelFake").GetComponentsInChildren<UIButton>();
foreach (UIButton child in buttonChilds) {
child.enabled = true;
}
UILabel[] labelChilds = GameObject.Find("PanelFake").GetComponentsInChildren<UILabel>();
foreach (UILabel child in labelChilds) {
child.enabled = true;
}
UISlicedSprite[] slicedSpriteChilds = GameObject.Find("PanelFake").GetComponentsInChildren<UISlicedSprite>();
foreach (UISlicedSprite child in slicedSpriteChilds) {
child.enabled = true;
}
UIImageButton[] UIImageButtonChilds = GameObject.Find("PanelFake").GetComponentsInChildren<UIImageButton>();
foreach (UIImageButton child in UIImageButtonChilds) {
child.enabled = true;
}
}
public void disableFakePanel() {
UISprite[] spriteChilds = GameObject.Find("PanelFake").GetComponentsInChildren<UISprite>();
foreach (UISprite child in spriteChilds) {
child.enabled = false;
}
UIButton[] buttonChilds = GameObject.Find("PanelFake").GetComponentsInChildren<UIButton>();
foreach (UIButton child in buttonChilds) {
child.enabled = false;
}
UILabel[] labelChilds = GameObject.Find("PanelFake").GetComponentsInChildren<UILabel>();
foreach (UILabel child in labelChilds) {
child.enabled = false;
}
UISlicedSprite[] slicedSpriteChilds = GameObject.Find("PanelFake").GetComponentsInChildren<UISlicedSprite>();
foreach (UISlicedSprite child in slicedSpriteChilds) {
child.enabled = false;
}
UIImageButton[] UIImageButtonChilds = GameObject.Find("PanelFake").GetComponentsInChildren<UIImageButton>();
foreach (UIImageButton child in UIImageButtonChilds) {
child.enabled = false;
}
GameObject.Find("PanelFake").GetComponent<UIPanel>().widgetsAreStatic = true;
GameObject.Find("PanelFake").GetComponent<UIPanel>().enabled = false;
}