ProductPromotion
Logo

Lua

made by https://0x3d.site

GitHub - xebecnan/UniLua: A pure c# implementation of Lua 5.2 focus on compatibility with Unity
A pure c# implementation of Lua 5.2 focus on compatibility with Unity - xebecnan/UniLua
Visit Site

GitHub - xebecnan/UniLua: A pure c# implementation of Lua 5.2 focus on compatibility with Unity

GitHub - xebecnan/UniLua: A pure c# implementation of Lua 5.2 focus on compatibility with Unity

UniLua

A 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 Assets\Stages\GameMain.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.

项目中包含了一个微型的示例工程,用来演示 UniLua 的基本使用。
用 Unity3D 打开 Assets\Stages\GameMain.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, including coroutine and metatable, except some GC-related metamethods like __gc and __mode. )
  • 内置库 ( Libraries )

    • Base lib: done
    • Package lib: done
    • Coroutine lib: done
    • Table lib: done
    • IO 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-16 编码间进行转换 ( support convert between UTF-8 and UTF-16 )
  • 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 supported

SciMark

test on Unity3D 4.3.1, Windows 7, Intel i5-3470

  • FFT 1.07 [1024]
  • SOR 2.51 [100]
  • MC 0.66
  • SPARSE 1.59 [1000, 5000]
  • LU 1.84 [100]
  • SciMark 1.53 [small problem sizes]

常用链接 ( Links )##

More Resources
to explore the angular.

mail [email protected] to add your project or resources here 🔥.

Related Articles
to learn about angular.

FAQ's
to learn more about Angular JS.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory