在lua 里面调用Unity函数需要用到类型填上string字段却报错(ToLua)
–获取节点下所有objlocal objs;local oj= pin.transform:Find(“CenterPin”);objs=oj:GetComponentsInChildren(typeof(“UnityEngine.RectTransform”))print("打印名字 111: "…oj.gameObject.name)如上面代码所见,部分函数需要用到“typeof(“xxxxx”)”再转换一次。网上没这方面的内容,我写出来,希望大家少踩坑。必须注意我的tolua是7.x的好像
原创
2020-09-04 17:05:37 ·
350 阅读 ·
0 评论