public Record(SpreadSheetData.RoadLevelParameterData data) { this.id = data.Id; this.level = data.Level; this.impactRange = data.Impactrange; this.addBuff = data.Addbuff; }
public static bool Load(MasterDataRoadLevelParameter target) { var client = new DatabaseClient("", ""); var error = string.Empty; var db = client.GetDatabase(SpreadSheetName, ref error); var table = db.GetTable <RoadLevelParameterData>(WorkSheetName) ?? db.CreateTable <RoadLevelParameterData>(WorkSheetName); var myDataList = new List <MasterDataRoadLevelParameter.Record>(); var all = table.FindAll(); foreach (var element in all) { var data = new RoadLevelParameterData(); data = Cloner.DeepCopy <RoadLevelParameterData>(element.Element); myDataList.Add(new MasterDataRoadLevelParameter.Record(data)); } target.Records = myDataList.ToArray(); EditorUtility.SetDirty(target); AssetDatabase.SaveAssets(); return(true); }