Lua 5.2支持

This commit is contained in:
2026-02-03 02:44:58 +08:00
parent c64330b22f
commit 3c21a1ce3a
33 changed files with 14339 additions and 0 deletions

32
UniLua/LuaOsLib.cs Normal file
View File

@@ -0,0 +1,32 @@
namespace UniLua
{
using System.Diagnostics;
internal class LuaOSLib
{
public const string LIB_NAME = "os";
public static int OpenLib( ILuaState lua )
{
NameFuncPair[] define = new NameFuncPair[]
{
#if !UNITY_WEBPLAYER
new NameFuncPair("clock", OS_Clock),
#endif
};
lua.L_NewLib( define );
return 1;
}
#if !UNITY_WEBPLAYER
private static int OS_Clock( ILuaState lua )
{
lua.PushNumber(0); //TO PLUG
return 1;
}
#endif
}
}