yanghuan / proton Goto Github PK
View Code? Open in Web Editor NEWExport excel to xml, json, lua, etc., and automatically generate the read code.
License: Other
Export excel to xml, json, lua, etc., and automatically generate the read code.
License: Other
现在直接都是生成一个大的list 如何才能制定list的key
tools 只能放到 excel 文件加下才可以导出配置文件,能力有限,想把配置和工具分离,没能解决。
现在我有这么个需求:
1、只用一个 tools,有很多模块共用此 tools;
2、每个模块包含很多的配置文件;
3、目录结构
proton
|____ tools
|____ module_1_excel
|____ module_2_excel
|____ modele_xxx
这个该怎么修改呢?
目前的配置加载是一次把所有的配置都读出来,而且每个配置表都要人为添加Manager类,我想每次需要配置的时候读取某个特定配置,应该怎么做?
python小白,试着把EXPORT_FILES里面的文件名加改成了
EXPORT_FILES = [
"excels/hero.xlsx",
"excels/mount.xlsx"
]
结果报错说Permission denied: 'excels'.
请大佬指教。
最近对话系统比较简单,想想应该能用此工具可以解决,有中文和英文两个版本,中文版版本还好,英文版本就转不出来了。大佬,有时间可以看看我的这个需求,但对话系统可能用这个配置也不是很合理,若可以实现当然最好啦,就让策划鼓捣了,我不去unity里边写个产出配置的工具了。我提供了一个Excel样例。
Dialogue.xlsx
格式定义: {int Id;string[] Names}[]
值: 10001;aa,bb,10002;cc,dd,10003;ee,ff
Error信息:
ValueError: ("could not convert string to float: 'bb'", '英雄|Hero has a error in 5 row 9(Test) column in hero.xlsx', '')
{int Id;int[] Names}[]
同类型定义不会报错
比如这种:{1: [11, {2: (1,2)}]}
输出Json时可以有选项么?因为我有时候配置比较大,我不想要Json格式化,只输出一行,节约我的空间。
你的工具精简但是很强大,首先谢谢的工具,减轻了些负担。
可以修改下 Json 的导出格式么?这样可以快速的支持 Unity 的 Json 工具。
我以 mount.xlsx 这个文件举例。
使用此文件导出的 Json,Unity 需要两个类,如下:
`[System.Serializable]
public class MountList
{
public Mount[] DataList;
}
[System.Serializable]
public class Mount
{
public int Id;
public string Name;
public Mount(int id, string name)
{
Id = id;
Name = name;
}
} 对应的 Json 文件
{
"DataList": [
{
"Id": 1001,
"Name": "战车"
},
{
"Id": 1001,
"Name": "马"
},
{
"Id": 1001,
"Name": "飞毯"
}
]
}而工具生成的文件如下:
[
{
"Id": 10001,
"Name": "战车"
},
{
"Id": 10002,
"Name": "马"
},
{
"Id": 10003,
"Name": "飞毯"
}
]`
无法直接通过 Unity 的 Json 工具类进行解析。
建议在生成的 Json 的数组时加上数组名,类似 Json 工具类生成的 json 文件。
为了能支持 Unity Json 工具类手动修改工作量也不大,但 Unity Json 工具类生成的文件蛮清晰的。
再者发现 Json 解析非常耗时,可以进一步支持转化到 ScriptableObject 对象,测试发现解析速度最快的,但不支持子线程解析。
导出变成\\n
string array may has ',' is single string
use , escape
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.