public BackgroundData(GameObject background)
    {
        name  = background.name;
        rtd   = new RectTransformData(background.GetComponent <RectTransform>());
        image = new ImageData(background.GetComponent <Image>());
        //Fill the connection arrays
        PageElementEventTrigger peet = background.GetComponent <PageElementEventTrigger>();

        connections = XMLSerializationManager.setElementIndexes(peet);
    }
    public ButtonData(GameObject button)
    {
        name  = button.name;
        rtd   = new RectTransformData(button.GetComponent <RectTransform>());
        image = new ImageData(button.GetComponent <Image>());
        etd   = new EventTriggerData(button.GetComponent <EventTrigger>());
        text  = new TextData(button.GetComponentInChildren <Text>());
        PageElementEventTrigger peet = button.GetComponent <PageElementEventTrigger>();

        connections = XMLSerializationManager.setElementIndexes(peet);
    }
    public ScrollAreaData(GameObject scrollArea)
    {
        name = scrollArea.name;

        //SA fields
        rtd_SA   = new RectTransformData(scrollArea.GetComponent <RectTransform>());
        image_SA = new ImageData(scrollArea.GetComponent <Image>());

        //TB fields
        GameObject textBox = scrollArea.transform.GetChild(0).gameObject;

        rtd_TB = new RectTransformData(textBox.GetComponent <RectTransform>());
        srd_TB = new ScrollRectData(textBox.GetComponent <ScrollRect>());

        //SB fields
        GameObject scrollbar = textBox.transform.GetChild(0).gameObject;

        rtd_SB   = new RectTransformData(scrollbar.GetComponent <RectTransform>());
        image_SB = new ImageData(scrollbar.GetComponent <Image>());
        sb_SB    = new ScrollbarData(scrollbar.GetComponent <Scrollbar>());

        //SlA fields
        GameObject slidingArea = scrollbar.transform.GetChild(0).gameObject;

        rtd_SlA = new RectTransformData(slidingArea.GetComponent <RectTransform>());

        //Handle fields
        GameObject handle = slidingArea.transform.GetChild(0).gameObject;

        rtd_H   = new RectTransformData(handle.GetComponent <RectTransform>());
        image_H = new ImageData(handle.GetComponent <Image>());

        //TextFields
        GameObject text = textBox.transform.GetChild(1).gameObject;

        rtd_T  = new RectTransformData(text.GetComponent <RectTransform>());
        text_T = new TextData(text.GetComponent <Text>());

        //EventTrigger fields
        PageElementEventTrigger peet = scrollArea.GetComponent <PageElementEventTrigger>();

        connections = XMLSerializationManager.setElementIndexes(peet);
    }