当前位置:网站首页>[xlua notes] array of lua to array of C #
[xlua notes] array of lua to array of C #
2022-07-07 02:20:00 【Start()】
To C# Of string Group :
-- Pass in a Lua String group of
-- Return to one C# String group of
function GetStringList(var)
local count = #var
local lis = CS.System.Array.CreateInstance(typeof(CS.System.String),count)
for i=0,count-1 do
lis[i] = var[i+1]
end
return lis
end
To C# Of int Group :
-- Pass in a Lua Of int Group
-- Return to one C# Of int Group
function GetIntList(var)
local count = #var
local lis = CS.System.Array.CreateInstance(typeof(CS.System.Int32),count)
for i=0,count-1 do
lis[i] = var[i+1]
end
return lis
end
To C# Of float Group :
-- Pass in a Lua Of float Group
-- Return to one C# Of float Group
function GetFloatList(var)
local count = #var
local lis = CS.System.Array.CreateInstance(typeof(CS.System.Single),count)
for i=0,count-1 do
lis[i] = var[i+1]
end
return lis
end
Lua Group representation :
Group name = { Elements 1, Elements 2, Elements 3}
边栏推荐
- 机器人队伍学习方法,实现8.8倍的人力回报
- 2022/0524/bookstrap
- ROS learning (25) rviz plugin
- 低代码平台中的数据连接方式(上)
- Analyze "C language" [advanced] paid knowledge [II]
- Why am I warned that the 'CMAKE_ TOOLCHAIN_ FILE' variable is not used by the project?
- How did partydao turn a tweet into a $200million product Dao in one year
- go swagger使用
- UC伯克利助理教授Jacob Steinhardt预测AI基准性能:AI在数学等领域的进展比预想要快,但鲁棒性基准性能进展较慢
- Alibaba cloud middleware open source past
猜你喜欢

ROS learning (24) plugin

Centros 8 installation MySQL Error: The gpg Keys listed for the "MySQL 8.0 Community Server" repository are already ins

Alibaba cloud middleware open source past

机器人队伍学习方法,实现8.8倍的人力回报

15million employees are easy to manage, and the cloud native database gaussdb makes HR office more efficient

Infrared camera: juge infrared mag32 product introduction

1500万员工轻松管理,云原生数据库GaussDB让HR办公更高效

一片葉子兩三萬?植物消費爆火背後的“陽謀”

2022/0524/bookstrap

Stm32f4 --- PWM output
随机推荐
【论文阅读|深读】 GraphSAGE:Inductive Representation Learning on Large Graphs
FLIR blackfly s usb3 industrial camera: how to use counters and timers
What to do when encountering slow SQL? (next)
猫猫回收站
Redis configuration class redisconfig
centos8 用yum 安装MySQL 8.0.x
Flir Blackfly S 工业相机:自动曝光配置及代码
使用Ceres进行slam必须要弄清楚的几个类和函数
@Before, @after, @around, @afterreturning execution sequence
张平安:加快云上数字创新,共建产业智慧生态
centos8安裝mysql報錯:The GPG keys listed for the “MySQL 8.0 Community Server“ repository are already ins
Halcon knowledge: segment_ contours_ XLD operator
The last line of defense of cloud primary mixing department: node waterline design
Treadpoolconfig thread pool configuration in real projects
Big guys gather | nextarch foundation cloud development meetup is coming!
Threadlocalutils (tool class IV)
ROS learning (XIX) robot slam function package cartographer
Unicode string converted to Chinese character decodeunicode utils (tool class II)
go swagger使用
ROS learning (22) TF transformation