/// <summary>
    /// Create a UI field and bind its data to the Input
    /// For use with non-array objects
    /// </summary>
    private void CreateAndBindField(object obj, FieldInfo field, Transform container)
    {
        GameObject lineItem = CreateField(field, container);
        Type       type     = field.FieldType;
        object     value    = field.GetValue(obj);

        if (_supportedTypes.Contains(field.FieldType))
        {
            if (field.FieldType == typeof(string))
            {
                InputField input = lineItem.GetComponentInChildren <InputField>();
                input.onValueChanged.AddListener(new UnityAction <string>((val) => { UpdateDataObject(obj, field, val); }));
                input.text = (string)value;
            }
            else if (field.FieldType == typeof(int))
            {
                InputField input = lineItem.GetComponentInChildren <InputField>();
                input.onValueChanged.AddListener(new UnityAction <string>((val) => { UpdateDataObject(obj, field, val); }));
                input.text = value.ToString();
            }
            else if (field.FieldType == typeof(bool))
            {
                Toggle input = lineItem.GetComponentInChildren <Toggle>();
                input.onValueChanged.AddListener(new UnityAction <bool>((val) => { UpdateDataObject(obj, field, val); }));
                input.isOn = (bool)value;
            }
        }
        else if (field.FieldType.GetInterface("IEditable") != null)
        {
            object classObject         = field.GetValue(obj);
            InformationGridEntry entry = lineItem.GetComponent <InformationGridEntry>();
            PopulateViewGroup(classObject, entry.Container);
            entry.SetContainerToggle(true);
        }
    }
    /// <summary>
    /// Create a UI field and bind its data to the Input
    /// For use with array elements
    /// </summary>
    private void CreateAndBindArrayElements(object obj, FieldInfo field, Transform container)
    {
        IList fieldEntries = (IList)field.GetValue(obj);
        Type  elementType  = field.FieldType.GetElementType();

        if (fieldEntries != null)
        {
            for (int i = 0; i < fieldEntries.Count; i++)
            {
                int index = i;

                //Create or get gameobject
                GameObject elementLineItem = null;
                if (container.childCount > i)
                {
                    elementLineItem = container.GetChild(i).gameObject;
                }
                else
                {
                    elementLineItem = CreateField(elementType, container, "Element " + index);
                }

                //Get entry component
                InformationGridEntry entry = elementLineItem.GetComponent <InformationGridEntry>();
                entry.DeleteButton.onClick.RemoveAllListeners();
                entry.DeleteButton.onClick.AddListener(() => { RemoveArrayElement(obj, field, container, index); });
                entry.DeleteButton.gameObject.SetActive(true);

                //Populate and bind field based on type
                if (_supportedTypes.Contains(elementType))
                {
                    if (elementType == typeof(string))
                    {
                        InputField input = elementLineItem.GetComponentInChildren <InputField>();
                        input.onValueChanged.RemoveAllListeners();
                        input.onValueChanged.AddListener(new UnityAction <string>((val) => { UpdateArrayDataObject(obj, field, index, val); }));
                        input.text = (string)fieldEntries[index];
                    }
                    else if (elementType == typeof(int))
                    {
                        InputField input = elementLineItem.GetComponentInChildren <InputField>();
                        input.onValueChanged.RemoveAllListeners();
                        input.onValueChanged.AddListener(new UnityAction <string>((val) => { UpdateArrayDataObject(obj, field, index, val); }));
                        input.text = fieldEntries[index].ToString();
                    }
                    else if (elementType == typeof(bool))
                    {
                        Toggle input = elementLineItem.GetComponentInChildren <Toggle>();
                        input.onValueChanged.RemoveAllListeners();
                        input.onValueChanged.AddListener(new UnityAction <bool>((val) => { UpdateArrayDataObject(obj, field, index, val); }));
                        input.isOn = (bool)fieldEntries[index];
                    }
                }
                //Custom Classes
                else if (elementType.GetInterface("IEditable") != null)
                {
                    //If object in array is null, create a new one
                    if (fieldEntries[index] == null)
                    {
                        fieldEntries[index] = Activator.CreateInstance(elementType);
                    }

                    object classObject = fieldEntries[index];
                    InformationGridEntry classEntry = elementLineItem.GetComponent <InformationGridEntry>();

                    //Clear container of previous entries
                    for (int c = 0; c < classEntry.Container.childCount; c++)
                    {
                        Destroy(classEntry.Container.GetChild(c).gameObject);
                    }

                    PopulateViewGroup(classObject, classEntry.Container);
                    classEntry.SetContainerToggle(false);
                }
            }

            //Destroy any extra lines
            for (int i = fieldEntries.Count; i < container.childCount; i++)
            {
                Destroy(container.GetChild(i).gameObject);
            }
        }
    }