当前位置:网站首页>[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}
边栏推荐
- ROS learning (23) action communication mechanism
- Flir Blackfly S 工业相机 介绍
- The empirical asset pricing package (EAP) can be installed through pypi
- 最近小程序开发记录
- 传感器:土壤湿度传感器(XH-M214)介绍及stm32驱动代码
- Word wrap when flex exceeds width
- 建議收藏!!Flutter狀態管理插件哪家强?請看島上碼農的排行榜!
- Why am I warned that the 'CMAKE_ TOOLCHAIN_ FILE' variable is not used by the project?
- Introduction to microservice architecture
- How can reinforcement learning be used in medical imaging? A review of Emory University's latest "reinforcement learning medical image analysis", which expounds the latest RL medical image analysis co
猜你喜欢
Flir Blackfly S工业相机:颜色校正讲解及配置与代码设置方法
ROS learning (XIX) robot slam function package cartographer
大咖云集|NextArch基金会云开发Meetup来啦!
阿里云中间件开源往事
Recommended collection!! Which is the best flutter status management plug-in? Please look at the ranking list of yard farmers on the island!
Zhang Ping'an: accelerate cloud digital innovation and jointly build an industrial smart ecosystem
Cisp-pte practice explanation (II)
leetcode:5. 最长回文子串【dp + 抓着超时的尾巴】
低代码平台中的数据连接方式(上)
ROS learning (21) robot slam function package -- installation and testing of orbslam
随机推荐
[paper reading | deep reading] graphsage:inductive representation learning on large graphs
leetcode:5. 最长回文子串【dp + 抓着超时的尾巴】
将截断字符串或二进制数据
Sensor: introduction of soil moisture sensor (xh-m214) and STM32 drive code
处理streamlit库上传的图片文件
企业中台建设新路径——低代码平台
传感器:DS1302时钟芯片及驱动代码
Errors made in the development of merging the quantity of data in the set according to attributes
The empirical asset pricing package (EAP) can be installed through pypi
低代码平台中的数据连接方式(上)
传感器:土壤湿度传感器(XH-M214)介绍及stm32驱动代码
强化学习如何用于医学影像?埃默里大学最新《强化学习医学影像分析》综述,阐述最新RL医学影像分析概念、应用、挑战与未来方向
String or binary data will be truncated
MetaForce原力元宇宙开发搭建丨佛萨奇2.0系统开发
【论文阅读|深读】DNGR:Deep Neural Networks for Learning Graph Representations
Schedulx v1.4.0 and SaaS versions are released, and you can experience the advanced functions of cost reduction and efficiency increase for free!
Halcon实例转OpenCvSharp(C# OpenCV)实现--瓶口缺陷检测(附源码)
阿里云中间件开源往事
1500万员工轻松管理,云原生数据库GaussDB让HR办公更高效
Data connection mode in low code platform (Part 1)