unity lua获取时间戳xlua
在lua脚本unity中: local onFrameTime =CS.UnityEngine.Time.time;--getLuaTime();--coroutine.yield(CS.UnityEngine.WaitForEndOfFrame());
local perTime = CS.UnityEngine.Time.time-onFrameTime;在lua中获取时间戳:function getLuaTime()
local socket = require "socket"
local t0 = socket.gettime()
return t0;
end--注意这里lua中获取的时间戳不准确
页:
[1]