当前位置:网站首页>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 .
边栏推荐
- [develop wechat applet local storage with uni app]
- Notes | numpy-08 Advanced index
- Basic use of Metasploit penetration testing framework
- MySQL winter vacation self-study 2022 12 (3)
- Market status and development prospects of the global automatic tea picker industry in 2022
- Handler understands the record
- Distinguish between releases and snapshots in nexus private library
- [USACO 2009 Dec S]Music Notes
- 【SQL注入】联合查询(最简单的注入方法)
- Web security - CSRF (token)
猜你喜欢

关于开学的准备与专业认知

The simple problem of leetcode: dismantling bombs

Silent authorization login and registration of wechat applet

Esp32-c3 learning and testing WiFi (II. Wi Fi distribution - smart_config mode and BlueIf mode)

Review the old and know the new: Notes on Data Science

UiPath实战(08) - 选取器(Selector)

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

带有注意力RPN和多关系检测器的小样本目标检测网络(提供源码和数据及下载)...

Keepalived热备与HAProxy

Concurrent operation memory interaction
随机推荐
文献阅读_基于多模态数据语义融合的旅游在线评论有用性识别研究(中文文献)
LVS load balancing cluster of efficient multi-purpose cluster (NAT mode)
JS multidimensional array to one-dimensional array
Preparation for school and professional cognition
Leetcode simple question: check whether the array is sorted and rotated
Symbol of array element product of leetcode simple problem
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
Leetcode simple question: check whether the string is an array prefix
Keepalived热备与HAProxy
【XSS绕过-防护策略】理解防护策略,更好的绕过
The principle is simple, but I don't know how to use it? Understand "contemporaneous group model" in one article
The simple problem of leetcode: dismantling bombs
Thesis reading_ Tsinghua Ernie
Handling record of electric skateboard detained by traffic police
Distinguish between releases and snapshots in nexus private library
【SQL注入】联合查询(最简单的注入方法)
Web security - CSRF (token)
Network security textual research recommendation
Market status and development prospect prediction of global SoC Test Platform Industry in 2022
UiPath实战(08) - 选取器(Selector)