void OnEnable() { _enumArray = TSDatabaseUtils.GetEnums(); _typeList = new ReorderableList(TSDatabaseUtils.TableConfigSerializeData.TableConfigList, typeof(TableConfig), true, true, true, false); _typeList.elementHeight = 30; _typeList.onSelectCallback = TypeListSelectCallback; _typeList.drawHeaderCallback = TypeListDrawHeaderCallback; _typeList.drawElementCallback = TypeListDrawElementCallback; _typeList.onAddCallback = TypeListAddCallback; if (_selectConfigIndex >= 0) { if (_selectConfigIndex >= TSDatabaseUtils.TableConfigSerializeData.TableConfigList.Count) { _selectConfigIndex = 0; } else { _tempTableConfig = TSDatabaseUtils.TableConfigSerializeData.TableConfigList[_selectConfigIndex]; _typeInfoList = new ReorderableList(_tempTableConfig.FieldList, typeof(FieldConfig), true, true, true, false); _typeInfoList.drawHeaderCallback = TypeInfoListDrawHeaderCallback; _typeInfoList.drawElementCallback = TypeInfoListDrawElementCallback; _typeInfoList.elementHeight = 80; } } }
void OnEnable() { if (_selectConfigIndex >= 0) { if (_selectConfigIndex >= TSDatabaseUtils.TableConfigSerializeData.TableConfigList.Count) { _selectConfigIndex = 0; } else { _tempTableConfig = TSDatabaseUtils.TableConfigSerializeData.TableConfigList[_selectConfigIndex]; } } _enumArray = TSDatabaseUtils.GetEnums(); }