当前位置:网站首页>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 .
边栏推荐
- [SQL injection point] location and judgment of the injection point
- Leetcode simple question: check whether the string is an array prefix
- Thesis reading_ Chinese medical model_ eHealth
- Current market situation and development prospect forecast of the global fire boots industry in 2022
- MediaTek 2023 IC written examination approved in advance (topic)
- Market status and development prospect prediction of global neutral silicone sealant industry in 2022
- M1 Pro install redis
- Introduction to message queuing (MQ)
- Leetcode simple problem delete an element to strictly increment the array
- Notes | numpy-07 Slice and index
猜你喜欢

M1 Pro install redis

Truncated sentences of leetcode simple questions

"Niuke brush Verilog" part II Verilog advanced challenge

RT thread flow notes I startup, schedule, thread

7. Integrated learning

I stepped on a foundation pit today

Retirement plan fails, 64 year old programmer starts work again

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

Cross platform plug-in flutter for displaying local notifications_ local_ notifications

The reason why the entity class in the database is changed into hump naming
随机推荐
ZABBIX monitoring of lamp architecture (3): zabbix+mysql (to be continued)
UiPath实战(08) - 选取器(Selector)
Flutter monitors volume to realize waveform visualization of audio
2022 t elevator repair simulation examination question bank and t elevator repair simulation examination question bank
[luatos sensor] 1 light sensing bh1750
Kept hot standby and haproxy
普通本科大学生活避坑指南
【工具跑SQL盲注】
Without 50W bride price, my girlfriend was forcibly dragged away. What should I do
[research materials] the fourth quarter report of the survey of Chinese small and micro entrepreneurs in 2021 - Download attached
Problems encountered in fuzzy query of SQL statements
Handling record of electric skateboard detained by traffic police
[tools run SQL blind note]
Uipath practice (08) - selector
Silent authorization login and registration of wechat applet
Hire cashier (differential constraint)
C language self-made Games: Sanzi (tic tac toe chess) intelligent chess supplement
Web security - CSRF (token)
论文阅读_清华ERNIE
LVS load balancing cluster of efficient multi-purpose cluster (NAT mode)