Unity
当前unity版本 :2020.3.33f1c2 personal
Xlua
下载地址:https://github.com/Tencent/xLua/releases

随便那都行
安装流程
1 解压缩压缩包

2 拷贝xlua中Asset的所有文件到项目Assets目录下

3 等待编译过后,在主菜单出现对应的菜单

4 验证环境,把Example中的hello world 加入到场景实例中运行
/*
* Tencent is pleased to support the open source community by making xLua available.
* Copyright (C) 2016 THL A29 Limited, a Tencent company. All rights reserved.
* Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/MIT
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*/
using UnityEngine;
using XLua;
namespace XLuaTest
{
public class Helloworld : MonoBehaviour
{
// Use this for initialization
void Start()
{
LuaEnv luaenv = new LuaEnv();
luaenv.DoString("CS.UnityEngine.Debug.Log('hello world, xlua')");
luaenv.Dispose();
}
// Update is called once per frame
void Update()
{
}
}
}

评论前必须登录!
注册