Lua-U3d
SendSi
撸
展开
-
在UnityEditor下热更Lua代码.自动
源文出自:https://zhuanlan.zhihu.com/p/91022294,进行修改了,针对自身项目进行修改了,本文为记录 此脚本挂到场景中:FileWatcher using UnityEngine; using System.IO; using System.Collections; using System.Collections.Generic; /// <summary> /// 监听文件改变 /// </summary> public sealed class原创 2022-03-01 16:33:01 · 152 阅读 · 0 评论 -
在UnityEditor下热更Lua代码
[MenuItem("Tools/Editor下更Lua _F6")] public static void ShowLua() { EditorWindow.GetWindow(typeof(RefreshLuaScripts), false, "Editor下更Lua", true); } string mInputArea; void OnGUI() mInputArea = EditorGUILayout.TextArea(mInputArea, mStyle, GUILayou..原创 2022-03-01 15:03:15 · 169 阅读 · 0 评论 -
LuaFramework案例_01
001.在C#代码中,直接 写 Lua代码 void Awake() { LuaState lua = new LuaState(); lua.Start(); string luaScriptContent = @"print('在C#代码中,直接 写 Lua代码,start lua studio --> tolua');";原创 2017-09-24 16:37:13 · 529 阅读 · 0 评论 -
LuaFramework案例_02
4.接收,改变Lua的值public class Studio_AccessingLuaVariables : MonoBehaviour { string script = @" print('obj---'..obj) var2Read=42 varTable={1,2,2,6} varTable.default=1 varTable.map={} varTable.map.name='原创 2017-11-03 17:32:49 · 502 阅读 · 0 评论