位置: 编程技术 - 正文

一个纯C#的Lua 5.2实现(编写一个c#)

编辑:rootadmin

推荐整理分享一个纯C#的Lua 5.2实现(编写一个c#),希望有所帮助,仅作参考,欢迎阅读内容。

文章相关热门搜索词:c# :?,c# :?,编写一个c#,c# uia,c# lora,c# uia,c# uia,一个c#程序主要包括,内容如对您有帮助,希望把文章链接给更多的朋友!

pure C# implementation of Lua 5.2 focus on compatibility with Unity3D.

UniLua是一个纯C#的Lua 5.2实现,专注于与Unity3D的兼容性。

一些补充说明

UniLua 主要关注的还是对 lua 本身的实现,而不是怎么把 Unity3D 引擎提供的功能都引入到 lua 里。

从 lua 调用 C# 函数不建议使用 FFI 库(虽然示例工程里用了,看起来方便,但是并不完善,效率也不好)。建议参考 从 Lua 调用 C# 函数 ( Calling C# funcitons from Lua ) 来自己实现封装函数。

示例工程 ( Sample Project )

To demonstrate the basic use of UniLua, a sample project is included.Open AssetsStagesGameMain.unity with Unity3D, and just click the "Play" button.An icon will appear in the screen, and you can move it around with WSAD keys.

一个纯C#的Lua 5.2实现(编写一个c#)

项目中包含了一个微型的示例工程,用来演示 UniLua 的基本使用。用 Unity3D 打开 AssetsStagesGameMain.unity 然后直接点击播放按钮运行。屏幕上会显示一个小图标,你可以用 WSAD 键控制它四处移动。

开发状况 ( Development Status )基本特性 ( Basic features )所有 Lua 的基本语言特性都已实现,包括协程和元表,并且与 Lua5.2 标准实现一致。部分 GC 相关的元方法如 __gc 和 __mode 未实现( All language features are implemented exactly the same as the standard Lua 5.2, includingcoroutine and metatable, except some GC-related metamethods like __gc and __mode. )

内置库 ( Libraries )

Base lib: donePackage lib: doneCoroutine lib: doneTable lib: doneIO lib: not implemented因为暂时没有需求 ( not needed in our games right now )OS lib: not implemented因为暂时没有需求 ( not needed in our games right now )String lib: partially implemented因为暂时没有需求 ( not needed in our games right now )Debug lib: partially implemented勉强够用了 ( barely enough )

额外实现的库 ( Additional Libraries )

FFI lib: basicly done实验性质,不建议在要求性能的环境下使用 ( experimental. not suggested to use in performance-critical situation )Encoding lib: basicly done支持在 UTF-8 编码和 UTF- 编码间进行转换 ( support convert between UTF-8 and UTF- )

TODO

Complete string lib.Complete debug lib.

已知的问题 ( Known Issues )

Metamethod '__gc' will not working.因为没有自己实现GC机制,而是依赖于C#的GC ( for directly depending on C#'s GC mechanism )Weak tables is not supported: '__mode' will not working.原因同上 ( the same reason mentioned above )full userdata is not supportedSciMark

test on Unity3D 4.3.1, Windows 7, Intel i5-

FFT 1. []SOR 2. []MC 0.SPARSE 1. [, ]LU 1. []SciMark 1. [small problem sizes]常用链接 ( Links )Wiki首页 (Wiki Homepage)一些简单的说明 ( Quick Start )从 C# 调用 Lua ( Calling Lua function from C# )从 Lua 调用 C# 函数 ( Calling C# funcitons from Lua )从AssetBundle加载代码 ( Loading code from asset bundles )UTF-8 supportReference: Lua functionsReference: C# API

一块钱买的 泣链接:

unity3d之使用ugui 创建仪表盘 最近开始使用ugui制作游戏ui,在此记录下来以供大家共同学习。

Unity3D游戏开发之换装系统的实现 大家好,我是秦元培,欢迎大家关注我的博客,我的博客地址是blog.csdn.net/qinyuanpei。不知从什么时候开始,国产RPG单机游戏开始出现换装,仙剑系列中

本文链接地址:https://www.jiuchutong.com/biancheng/380106.html 转载请保留说明!

上一篇:Unity3D高通AR开发(一)——账户注册(unity arkit)

下一篇:一块钱买的(一块钱买的鱼多久换一次水)

免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

鄂ICP备2023003026号

网站地图: 企业信息 工商信息 财税知识 网络常识 编程技术

友情链接: 武汉网站建设 电脑维修 湖南楚通运网络