当前位置:网站首页>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 .
边栏推荐
- Prepare for 2022 and welcome the "golden three silver four". The "summary of Android intermediate and advanced interview questions in 2022" is fresh, so that your big factory interview can go smoothly
- Interface frequency limit access
- Market status and development prospect prediction of the global fire extinguisher industry in 2022
- LVS load balancing cluster of efficient multi-purpose cluster (NAT mode)
- [set theory] relation properties (reflexivity | reflexivity theorem | reflexivity | reflexivity theorem | example)
- Hire cashier (differential constraint)
- The least operation of leetcode simple problem makes the array increment
- [research materials] annual report of China's pension market in 2021 - Download attached
- SSM framework integration
- [clock 223] [binary tree] [leetcode high frequency]: 102 Sequence traversal of binary tree
猜你喜欢

Kept hot standby and haproxy
![[set theory] relationship properties (symmetry | symmetry examples | symmetry related theorems | antisymmetry | antisymmetry examples | antisymmetry theorems)](/img/34/d195752992f8955bc2a41b4ce751db.jpg)
[set theory] relationship properties (symmetry | symmetry examples | symmetry related theorems | antisymmetry | antisymmetry examples | antisymmetry theorems)

Network security textual research recommendation

Automatic voltage rise and fall 5-40v multi string super capacitor charging chip and solution

Handler understands the record

LVS load balancing cluster of efficient multi-purpose cluster (NAT mode)
![[research materials] 2021 annual report on mergers and acquisitions in the property management industry - Download attached](/img/95/833f5ec20207ee5d7e6cdfa7208c5e.jpg)
[research materials] 2021 annual report on mergers and acquisitions in the property management industry - Download attached

SSM framework integration

RT thread flow notes I startup, schedule, thread

Sdl2 + OpenGL glsl practice (Continued)
随机推荐
Sprintf formatter abnormal exit problem
Games101 Lesson 9 shading 3 Notes
Without 50W bride price, my girlfriend was forcibly dragged away. What should I do
逆袭大学生的职业规划
Cross platform plug-in flutter for displaying local notifications_ local_ notifications
[tools run SQL blind note]
Wechat applet waterfall flow and pull up to the bottom
【XSS绕过-防护策略】理解防护策略,更好的绕过
Market status and development prospects of the global automatic tea picker industry in 2022
The current market situation and development prospect of the global gluten tolerance test kit industry in 2022
Market status and development prospect prediction of the global fire hose industry in 2022
雇佣收银员(差分约束)
Market status and development prospect prediction of the global forward fluorescent microscope industry in 2022
Market status and development prospect forecast of global button dropper industry in 2022
Concurrent operation memory interaction
Interface frequency limit access
Career planning of counter attacking College Students
[set theory] relation properties (reflexivity | reflexivity theorem | reflexivity | reflexivity theorem | example)
I stepped on a foundation pit today
Learning record of arouter principle