当前位置:网站首页>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 .
边栏推荐
- Symbol of array element product of leetcode simple problem
- MPM model and ab pressure test
- On typescript and grammar
- Do you know UVs in modeling?
- Introduction to JVM principle
- Leetcode simple question: check whether the array is sorted and rotated
- Market status and development prospect prediction of global neutral silicone sealant industry in 2022
- 论文阅读_ICD编码_MSMN
- Market status and development prospect prediction of the global fire hose industry in 2022
- Interface frequency limit access
猜你喜欢

MC Layer Target

Sdl2 + OpenGL glsl practice (Continued)
![[research materials] annual report of China's pension market in 2021 - Download attached](/img/24/622aeeb38de16ac84128b362ceeddb.jpg)
[research materials] annual report of China's pension market in 2021 - Download attached

Leetcode simple question: check whether two string arrays are equal

Symbol of array element product of leetcode simple problem

2022 t elevator repair simulation examination question bank and t elevator repair simulation examination question bank

Review the configuration of vscode to develop golang

Thesis reading_ Tsinghua Ernie

STM32 reverse entry

On typescript and grammar
随机推荐
Market status and development prospect prediction of the global fire alarm sensor industry in 2022
Oracle SQL table data loss
Small sample target detection network with attention RPN and multi relationship detector (provide source code, data and download)
On typescript and grammar
What is UUID
Do you know UVs in modeling?
Introduction to JVM principle
Market status and development prospect forecast of global heat curing adhesive industry in 2022
[SQL injection] joint query (the simplest injection method)
ZABBIX monitoring of lamp architecture (3): zabbix+mysql (to be continued)
Market status and development prospect prediction of global colorimetric cup cover industry in 2022
Leetcode simple question: check whether two string arrays are equal
Distinguish between releases and snapshots in nexus private library
Caijing 365 stock internal reference: what's the mystery behind the good father-in-law paying back 50 million?
2022 chemical automation control instrument examination summary and chemical automation control instrument certificate examination
sql语句模糊查询遇到的问题
Preparation for school and professional cognition
stm32逆向入门
普通本科大学生活避坑指南
The consumption of Internet of things users is only 76 cents, and the price has become the biggest obstacle to the promotion of 5g industrial interconnection