当前位置:网站首页>Unity tool Luban learning notes 1
Unity tool Luban learning notes 1
2022-07-03 04:54:00 【Nian, Xiaoyu】
This article is for personal note only
Luban GitHub Address
Study of the Treasure fish video and luban Using document
Start game environment configuration
1、 establish unity The project
2、 Put this (luban_examples-main\Projects\Csharp_Unity_json\Assets\LubanLib) Folder LubanLib Copy to Engineering Assets Under the table of contents
3、 Create a folder in the project root directory to store Luban Configure what you need
4、 hold luban_examples-main In the catalog MiniDesignerConfigsTemplate Copy the folder to the newly created Luban Directory ( I am renaming to Config 了 )
5、 Make a random copy of bat File to Luban Directory , And input the content to save ( Name to gen_code_json.bat)
set WORKSPACE=..
set GEN_CLIENT=%WORKSPACE%\Luban\Luban.ClientServer\Luban.ClientServer.exe
set CONF_ROOT=%WORKSPACE%\Luban\Config
%GEN_CLIENT% -j cfg --^
-d %CONF_ROOT%\Defines\__root__.xml ^
--input_data_dir %CONF_ROOT%\Datas ^
--output_code_dir %WORKSPACE%/Assets/Gen ^
--output_data_dir ..\GenerateDatas\json ^
--gen_types code_cs_unity_json,data_json ^
-s all
pause
6、 open item.xlsx file (\Luban\Config\Datas\item.xlsx), And casually add a paragraph
7、 Double-click on the run gen_code_json.bat I can generate , If you're wrong, watch the video and learn again .
8、 View the generated files , There's a json file , Open it and you can see
7、 open unity Create test scripts Luban_Test, And write content
using System.IO;
using cfg;
using cfg.item;
using cfg.MyBean;
using SimpleJSON;
using UnityEngine;
public class Luban_Test : MonoBehaviour
{
void Start()
{
Tables table = new Tables(Loader); // initialization
Item item = table.TbItem.Get(10010);
Debug.Log($"{
item.Name} {
item.Desc}");
}
private JSONNode Loader(string fileName)
{
Debug.Log(fileName);
return JSON.Parse(File.ReadAllText(Application.dataPath + "/../GenerateDatas/json/" + fileName + ".json"));
}
}
Luban Catalog :
This case is over .
边栏推荐
- 文献阅读_基于多模态数据语义融合的旅游在线评论有用性识别研究(中文文献)
- Caijing 365 stock internal reference: what's the mystery behind the good father-in-law paying back 50 million?
- Market status and development prospect prediction of the global fire extinguisher industry in 2022
- 【PHP漏洞-弱类型】基础知识、php弱相等、报错绕过
- 【SQL注入】联合查询(最简单的注入方法)
- The process of browser accessing the website
- Thesis reading_ Chinese NLP_ ELECTRA
- Shuttle + Alluxio 加速内存Shuffle起飞
- Number of uniform strings of leetcode simple problem
- ZABBIX monitoring of lamp architecture (3): zabbix+mysql (to be continued)
猜你喜欢
Use Sqlalchemy module to obtain the table name and field name of the existing table in the database
2022 new examination questions for the main principals of hazardous chemical business units and examination skills for the main principals of hazardous chemical business units
Uipath practice (08) - selector
[clock 223] [binary tree] [leetcode high frequency]: 102 Sequence traversal of binary tree
【工具跑SQL盲注】
Symbol of array element product of leetcode simple problem
First + only! Alibaba cloud's real-time computing version of Flink passed the stability test of big data products of the Institute of ICT
ZABBIX monitoring of lamp architecture (3): zabbix+mysql (to be continued)
UiPath实战(08) - 选取器(Selector)
Small sample target detection network with attention RPN and multi relationship detector (provide source code, data and download)
随机推荐
Market status and development prospect prediction of the global autonomous hybrid underwater glider industry in 2022
General undergraduate college life pit avoidance Guide
Caijing 365 stock internal reference: what's the mystery behind the good father-in-law paying back 50 million?
[set theory] relation properties (reflexivity | reflexivity theorem | reflexivity | reflexivity theorem | example)
document. The problem of missing parameters of referer is solved
Small sample target detection network with attention RPN and multi relationship detector (provide source code, data and download)
Market status and development prospect prediction of the global fire extinguisher industry in 2022
[USACO 2009 Dec S]Music Notes
MySQL winter vacation self-study 2022 12 (3)
Shuttle + alluxio accelerated memory shuffle take-off
[luatos sensor] 2 air pressure bmp180
Thesis reading_ Tsinghua Ernie
data2vec! New milestone of unified mode
The programmer resigned and was sentenced to 10 months for deleting the code. JD came home and said that it took 30000 to restore the database. Netizen: This is really a revenge
Automatic voltage rise and fall 5-40v multi string super capacitor charging chip and solution
Basic use of Metasploit penetration testing framework
Notes | numpy-08 Advanced index
Market status and development prospect prediction of the global fire alarm sensor industry in 2022
[set theory] relational representation (relational matrix | examples of relational matrix | properties of relational matrix | operations of relational matrix | relational graph | examples of relationa
[research materials] the fourth quarter report of the survey of Chinese small and micro entrepreneurs in 2021 - Download attached