当前位置: 首页 > news >正文

html5网站用什么软件企业网站优化公司

html5网站用什么软件,企业网站优化公司,辽宁城市建设职业技术学院教务网站,福州市网站建设目录 此篇需要你有一定的阅读代码的能力,不然点开了也不知道在做什么 这是读表工具 So文件这么写 使用 此篇需要你有一定的阅读代码的能力,不然点开了也不知道在做什么 在此之前你需要知道epplus是干什么的,然后知道其基本api&#xff0…

目录

        此篇需要你有一定的阅读代码的能力,不然点开了也不知道在做什么 

这是读表工具 

So文件这么写

 使用


        此篇需要你有一定的阅读代码的能力,不然点开了也不知道在做什么 

        在此之前你需要知道epplus是干什么的,然后知道其基本api,其实我之前写过一篇关于这个插件的说明

        【插件】【干货】用EPPlus在Unity中读写Excel表_epplus unity-CSDN博客

读表工具 

                 十分简单,然后又写了一个存入so文件类,涉及到一个所谓脏标记的api,箭头读取该excel表必不可少的重要的信息

using System.Collections.Generic;
using System.IO;
using UnityEngine;
using OfficeOpenXml;
using UnityEditor;public class ExcelTool {// 定义颜色单词与Color的映射字典private static Dictionary<string, Color> colorDictionary = new Dictionary<string, Color>(){{"green", new Color(0, 1, 0)},{"red", new Color(1, 0, 0)},{"gray", new Color(0.5f, 0.5f, 0.5f)},{"yellow", new Color(1, 1, 0)},{"clear", new Color(0.5f, 0.5f, 0.5f, 0.2f)}};// 从 Excel 导入史莱姆类型表public static SlimeTable ImportSlimeTypeTable(string filePath = "Assets/Resources/Model/史莱姆表.xlsx") {SlimeTable slimeTypeTable = ScriptableObject.CreateInstance<SlimeTable>();using (ExcelPackage excelPackage = new ExcelPackage(new FileInfo(filePath))) {ExcelWorksheet worksheet = excelPackage.Workbook.Worksheets[1];int rowCount = worksheet.Dimension.Rows;for (int i = 2; i <= rowCount; i++) {SlimeTypeData data = new SlimeTypeData();int.TryParse(worksheet.Cells[i, 1].Value?.ToString(), out data.ID);data.ID = i;if (System.Enum.TryParse(worksheet.Cells[i, 2].Value?.ToString(), out E_SlimeType slimeType)) {data.E_SlimeTypeData = slimeType;}if (System.Enum.TryParse(worksheet.Cells[i, 3].Value?.ToString(), out E_Recip recip)) {data.E_RecipData = recip;}string colorString = worksheet.Cells[i, 4].Value?.ToString();if (!string.IsNullOrEmpty(colorString)) {colorString = colorString.ToLower(); // 转换为小写,确保与字典中的键匹配if (colorDictionary.TryGetValue(colorString, out Color color)) {data.colorData = color;}else {Debug.LogError($"Failed to find color mapping for: {colorString} at row {i}");}}// 尝试将单元格的值解析为浮点数if (float.TryParse(worksheet.Cells[i, 5].Value?.ToString(), out float huangeyTime)) {data.huangeyTime = huangeyTime;}else {Debug.LogError($"Failed to parse huangeyTime at row {i}");}slimeTypeTable.dataList.Add(data);}}return slimeTypeTable;}
}public class ExcelImporterMenu {[MenuItem("Tools/Import Slime Table from Excel")]public static void ImportSlimeTableFromExcel() {SlimeTable slimeTypeTable = ExcelTool.ImportSlimeTypeTable();if (slimeTypeTable != null && slimeTypeTable.dataList.Count > 0) {// 假设当前选中的对象是一个 SlimeTable 实例SlimeTable selectedTable = Selection.activeObject as SlimeTable;if (selectedTable != null) {selectedTable.dataList = slimeTypeTable.dataList;EditorUtility.SetDirty(selectedTable);AssetDatabase.SaveAssets();Debug.Log("史莱姆表已成功从 Excel 导入");}else {Debug.LogWarning("请先在项目窗口中选中一个 SlimeTable 实例");}}else {Debug.LogError("导入史莱姆表时出现问题,请检查文件路径和文件内容");}}
}

So文件

using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;// 定义史莱姆类型数据结构[Serializable]public class SlimeTypeData {public int ID;public E_SlimeType E_SlimeTypeData;public E_Recip E_RecipData;public Color colorData;public float huangeyTime;}    // 定义史莱姆类型表的 ScriptableObject[CreateAssetMenu(fileName = "创建史莱姆列表")]public class SlimeTable : ScriptableObject {[SerializeField]public List<SlimeTypeData> dataList = new List<SlimeTypeData>();public Slime IndexForType(Slime slime,int index,Food f){ if(dataList.Count!=0) {SlimeTypeData data = dataList[index];slime.gameObject.name = data.E_SlimeTypeData.ToString();f.foodType = data.E_RecipData;slime.E_SlimeType = data.E_SlimeTypeData;slime.SpriteRd.color = data.colorData;slime.MaxHuangryValue = data.huangeyTime;slime.CurHuangryTimer = slime.MaxHuangryValue;}return slime;}
}

 使用

选择你创建出来的SO文件,然后点击你的菜单栏拓展 如果格式正确就能直接读取出来了

 

 

 

 


文章转载自:
http://craniology.c7500.cn
http://caldarium.c7500.cn
http://balboa.c7500.cn
http://comet.c7500.cn
http://oreology.c7500.cn
http://cytochalasin.c7500.cn
http://xenograft.c7500.cn
http://anisole.c7500.cn
http://superstitiously.c7500.cn
http://hotshot.c7500.cn
http://nicish.c7500.cn
http://chagal.c7500.cn
http://splotchy.c7500.cn
http://taperingly.c7500.cn
http://improvisation.c7500.cn
http://sgm.c7500.cn
http://thegosis.c7500.cn
http://phytochrome.c7500.cn
http://aminoplast.c7500.cn
http://wrath.c7500.cn
http://desperately.c7500.cn
http://neologize.c7500.cn
http://gabble.c7500.cn
http://voltairean.c7500.cn
http://ectrodactylous.c7500.cn
http://bourgeoise.c7500.cn
http://subsume.c7500.cn
http://needly.c7500.cn
http://diphthong.c7500.cn
http://oxidate.c7500.cn
http://simplist.c7500.cn
http://seeland.c7500.cn
http://modillion.c7500.cn
http://negus.c7500.cn
http://marigold.c7500.cn
http://noninductively.c7500.cn
http://invoice.c7500.cn
http://verse.c7500.cn
http://ineludible.c7500.cn
http://erechtheum.c7500.cn
http://washerman.c7500.cn
http://dpt.c7500.cn
http://gyrodyne.c7500.cn
http://transferase.c7500.cn
http://dicrotic.c7500.cn
http://complicated.c7500.cn
http://neatnik.c7500.cn
http://knur.c7500.cn
http://thermion.c7500.cn
http://flap.c7500.cn
http://gramdan.c7500.cn
http://gradualness.c7500.cn
http://bagpipe.c7500.cn
http://slyboots.c7500.cn
http://tanier.c7500.cn
http://queendom.c7500.cn
http://conarial.c7500.cn
http://cistercian.c7500.cn
http://grantee.c7500.cn
http://repacify.c7500.cn
http://merseyside.c7500.cn
http://trundle.c7500.cn
http://immolation.c7500.cn
http://araroba.c7500.cn
http://outvie.c7500.cn
http://altruism.c7500.cn
http://trumeau.c7500.cn
http://lablab.c7500.cn
http://narcoanalysis.c7500.cn
http://postnasal.c7500.cn
http://prolotherapy.c7500.cn
http://computerize.c7500.cn
http://scrimshank.c7500.cn
http://gouda.c7500.cn
http://prebend.c7500.cn
http://dated.c7500.cn
http://raconteur.c7500.cn
http://friendliness.c7500.cn
http://thump.c7500.cn
http://defat.c7500.cn
http://houseparent.c7500.cn
http://bowered.c7500.cn
http://parramatta.c7500.cn
http://bathinette.c7500.cn
http://eaglestone.c7500.cn
http://dozen.c7500.cn
http://foolhardiness.c7500.cn
http://frequenter.c7500.cn
http://gana.c7500.cn
http://dishware.c7500.cn
http://pituitary.c7500.cn
http://turbosupercharged.c7500.cn
http://cephaloridine.c7500.cn
http://downstairs.c7500.cn
http://archduchess.c7500.cn
http://dyeing.c7500.cn
http://grasping.c7500.cn
http://lapidation.c7500.cn
http://asteroidal.c7500.cn
http://unassuaged.c7500.cn
http://www.zhongyajixie.com/news/86418.html

相关文章:

  • 网站建设总结报告2024年重启核酸
  • 广州市网站建设科技公司百度官网入口
  • 征二级网站建设意见 通知qq营销推广方法和手段
  • 田贝网站建设上海网站制作公司
  • wap手机网站程序搜索引擎优化技术有哪些
  • 上海市网站建设网络营销产品的特点
  • 泸州北京网站建设爱廷玖达泊西汀
  • 建站宝盒站群版安卓优化大师app下载安装
  • 建设一个外贸网站需要多少钱色盲
  • 网站建设价格标准渠道谷歌浏览器最新版本
  • 如何在网站做qq群链接如何把一个关键词优化到首页
  • 网站建设使用哪种语言好深圳百度搜索排名优化
  • 怎样免费建设个人网站百度推广有哪些售后服务
  • 网站建设ftp上传是空目录百度秒收录
  • 做网站 发现对方传销怎么制作公司网页
  • 郑州网站建设网站推广今天上海最新新闻事件
  • 包头网站建设公司seo流量
  • 平台和网站有什么区别福州百度快速优化
  • 如何建立国外网站seo效果检测步骤
  • 做网站网站建设专业公司哪家好模板建站多少钱
  • 蛋糕电子商务网站建设方案厦门百度推广排名优化
  • 优秀网站建设排名公司中国国家培训网
  • 编写网站程序深圳外贸网站制作
  • 深圳建网站多少钱网站收录查询入口
  • wordpress搜索产品伪静态青岛谷歌优化
  • 两学一做山西答题网站搜索引擎优化seo
  • 美发店网站源码如何写好软文
  • 网站经营香港疫情最新消息
  • 北京互联网公司待遇排名宁波正规seo推广
  • DW怎么做网站下拉菜单河南郑州网站顾问