void CreateSchema(string name, List <FieldInfo> fields)
        {
            string error;
            Dictionary <string, object> schemaData = new Dictionary <string, object>();

            GDEItemManager.AddSchema(name, schemaData, out error, true);

            foreach (FieldInfo field in fields)
            {
                if (field.skip)
                {
                    continue;
                }
                else if (field.type != BasicFieldType.Undefined)
                {
                    GDEItemManager.AddBasicFieldToSchema(field.type, name, schemaData, field.name, out error, field.isList,
                                                         field.is2DList, GDEItemManager.GetDefaultValueForType(field.type));
                }
                else
                {
                    GDEItemManager.AddCustomFieldToSchema(field.customType, name, schemaData, field.name, field.isList, field.is2DList, out error);
                }

                if (error != string.Empty)
                {
                    Debug.LogError(string.Format(GDEConstants.ErrorInSheet, name, error, field.cellID));
                }
            }
        }
        private bool AddBasicField(BasicFieldType type, string schemaKey, Dictionary <string, object> schemaData, string newFieldName, bool isList)
        {
            bool   result       = true;
            object defaultValue = GDEItemManager.GetDefaultValueForType(type);
            string error;

            if (GDEItemManager.AddBasicFieldToSchema(type, schemaKey, schemaData, newFieldName, out error, isList, defaultValue))
            {
                SetNeedToSave(true);
            }
            else
            {
                EditorUtility.DisplayDialog(GDEConstants.ErrorCreatingField, error, GDEConstants.OkLbl);
                result = false;
            }

            return(result);
        }