Unity3D + ulua simpleframework的问题汇总
来源:互联网 发布:网络直播足球联赛 编辑:程序博客网 时间:2024/06/05 19:25
使用最新版本的(此时最新)的ulua, 生成wrapper文件时,对范型支持支持不是很好,如:
{System.Collections.Generic.List`1[System.String]&} 的type类型,会生成出System.Collections.Generic.List`1[System.String]到c#中,导致编译不通过。
经过代码review, 发现ToLuaExport文件中的GetStrType,对上面的类型判断IsGenericType返回false, 不确定是否是什么原因(&)引起的,
所以在else中修改成如下代码,就可以生成List<String>
else if(t.IsGenericType) { return GetGenericName(t); } else {// modified by cpeng for il2cpp// referenced to BindLua::GetGenericName<span style="font-family: Menlo;">Debug.Log("IsGenericType not work for " + t.ToString());</span>// t.IsGenericType for {System.Collections.Generic.List`1[System.String]&} somehow return false, we handle it here.if (t.GetGenericArguments().Length != 0) {Type[] gArgs = t.GetGenericArguments();string typeName = t.Name;string pureTypeName = typeName.Substring(0, typeName.IndexOf('`'));return pureTypeName + "<" + string.Join(",", GetGenericName(gArgs)) + ">";}return _C(t.ToString()); }
0 0
- Unity3D + ulua simpleframework的问题汇总
- Unity3D热更新:ULua && Simpleframework环境安装详解
- uLua+SimpleFramework常见问题的解答及学习笔记
- ULua && Simpleframework环境安装详解
- Unity3d ulua 环境搭建与所遇到的问题
- 【ulua学习笔记】SimpleFramework使用步骤总结
- Unity3d为ulua提供更新的接口
- 关于uLua在Unity3D的性能测试
- Unity3d 开发之 ulua 坑的总结
- unity3d ulua framwork build打包后shader丢失的问题记录
- unity3d ulua framwork build打包后shader丢失的问题记录
- uLua中遇到的问题
- ulua遇到相关的问题
- [Unity3D] 关于uLua在Unity3D的性能测试
- [Unity3D]uLua中类似Unity3D C# Messager的Event System
- unity3d ulua class
- Unity3D 自己碰到的问题汇总
- ulua 常见问题汇总
- RHCE 学习笔记(21) - SELinux
- Longest Palindromic Substring
- 积跬步,聚小流------come on,我的2016
- PHP学习之Apache修改默认站点的目录
- 深度解析RARP协议
- Unity3D + ulua simpleframework的问题汇总
- 2015-2-14笔记
- Light OJ 1205 Palindromic Numbers (数位DP)
- mac osx 和windows 时间不同步解决方法
- 什么是debug模式,,release模式?
- Qt For Android 之启动页
- 银行风控案例-python学习笔记
- linux下安装jdk和tomcat
- luabinding 中用Scrollview实现pageview的翻页效果