private void DrawSkuView() { GUILayout.Space(10); GUILayout.BeginVertical(); GUILayout.Space(10); mScrollSkuPos = GUILayout.BeginScrollView(mScrollSkuPos, GUILayout.Width(550)); foreach (var item in mSkuDatas) { GUILayout.BeginHorizontal(EditorStyles.helpBox); GUILayout.Label(item.block_sku_id.ToString(), GUILayout.Width(100)); if (GUILayout.Button(item.title, GUILayout.Width(200))) { mFocusSkuName = item.title; mCarItems = item.Models.ToList(); } GUILayout.Space(10); if (GUILayout.Button("生成SKU共用模型配置", GUILayout.Width(150))) { var t = new List <SkuData>(); t.Add(item); ModelPublisher.CreateCustomSkuModelResConfig(t, IsOnline); } GUILayout.EndHorizontal(); } GUILayout.EndScrollView(); GUILayout.EndVertical(); }
private void DrawSkusView() { GUILayout.Space(10); GUILayout.BeginHorizontal(); if (MainButton("生成所有搭建动画对应的缩略图配置文件", 30)) { HashSet <string> configFiles = new HashSet <string>(); mSkuDatas.SkuCarDatas().ForEach(s => { if (File.Exists("./" + BuildAnimDir + s.model_sku_id + ".txt")) { configFiles.Add(s.model_sku_id + ".txt"); } else { Debug.LogErrorFormat("文件>>>>{0}不存在,请确保已更新数据!", "./" + BuildAnimDir + s.model_sku_id + ".txt"); } }); ResPublisher.CreateBuildingThumbConfigs(configFiles.ToArray(), IsOnline); } if (MainButton("生成所有搭建动画对应的模型配置文件", 30)) { HashSet <string> configFiles = new HashSet <string>(); mSkuDatas.SkuCarDatas().ForEach(s => { if (File.Exists("./" + BuildAnimDir + s.model_sku_id + ".txt")) { configFiles.Add(s.model_sku_id + ".txt"); } else { Debug.LogErrorFormat("文件>>>>{0}不存在,请确保已更新数据!", s.model_sku_id); } }); ModelPublisher.CreateCustomConfig(configFiles.ToArray(), IsOnline); } if (MainButton("生成所有SKU对应的共用模型配置文件", 30)) { ModelPublisher.CreateCustomSkuModelResConfig(mSkuDatas, IsOnline); } GUILayout.EndHorizontal(); GUILayout.Space(10); GUILayout.BeginHorizontal(); DrawSkuView(); if (!string.IsNullOrEmpty(mFocusSkuName)) { DrawSkuCarView(); } GUILayout.EndHorizontal(); }