GithubHelp home page GithubHelp logo

isabella232 / unlua Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tencent/unlua

0.0 0.0 0.0 68.6 MB

A feature-rich, easy-learning and highly optimized Lua scripting plugin for UE.

License: Other

C++ 90.38% C 0.56% Lua 7.83% C# 1.23%

unlua's Introduction

LOGO

license release PRs Welcome

概述

UnLua是适用于UE的一个高度优化的Lua脚本解决方案。它遵循UE的编程模式,功能丰富且易于学习,UE程序员可以零学习成本使用。

在UE中使用Lua

  • 直接访问所有的UCLASS, UPROPERTY, UFUNCTION, USTRUCT, UENUM,无须胶水代码。
  • 替换蓝图中定义的实现 ( Event / Function )。
  • 处理各类事件通知 ( Replication / Animation / Input )。

更详细的功能介绍请查看功能清单

优化特性

  • UFUNCTION调用,包括持久化参数缓存、优化的参数传递、优化的非常量引用和返回值处理。
  • 访问容器类(TArray, TSet, TMap),内存布局与引擎一致,Lua Table和容器之间不需要转换。
  • 高效的结构体创建、访问、GC。
  • 支持自定义静态导出类、成员变量、成员函数、全局函数、枚举。

平台支持

  • 运行平台:Windows / Android / iOS / Linux / OSX
  • 引擎版本:Unreal Engine 4.17.x - Unreal Engine 5.x

注意: 4.17.x 和 4.18.x 版本需要对 Build.cs 做一些修改。

快速开始

安装

  1. 复制 Plugins 目录到你的UE工程根目录。
  2. 重新启动你的UE工程

开始UnLua之旅

注意: 如果你是一位UE萌新,推荐使用更详细的图文版教学继续以下步骤。

  1. 新建蓝图后打开,在UnLua工具栏中选择 绑定(可同时按住Alt键自动生成第2步的路径)
  2. 在接口的 GetModule 函数中填入Lua文件路径,如 GameModes.BP_MyGameMode
  3. 选择UnLua工具栏中的 创建Lua模版文件
  4. 打开 Content/Script/GameModes/BP_MyGameMode.lua 编写你的代码

更多示例

文档

常用文档:设置选项 | 调试 | 智能提示 | 控制台命令 | FAQ

详细介绍:

  • 插件与模块:介绍 Plugins 目录下的插件列表以及它们所包含的模块
  • 功能清单:更详细的功能列表
  • 实现原理:介绍 UnLua 的两种覆盖机制
  • 编程指南:介绍 UnLua 的主要功能和编程模式
  • API:更详细的 UnLua API 说明

技术支持

  • 官方交流QQ群:936285107
  • 推荐VSCode插件:Lua Booster

unlua's People

Contributors

xuyanghuang-tencent avatar forsakenyang avatar rowechien avatar crazytuzi avatar xiejiangzhi avatar c209 avatar italink avatar 909185693 avatar shuiliulcl avatar hohooho avatar michaelzdl avatar bobbycalf avatar inkiu0 avatar gotgimhong avatar quabqi avatar kimixuchen avatar hernanzhou avatar yj66xiaopipi avatar yangruihan avatar joaryyu avatar glorysl avatar luckscx avatar monkeykk avatar troutzhang avatar mongamind avatar hugebug4ever avatar hxhb avatar jozhn avatar shudal avatar swejackies avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.