2017年8月21日
摘要: 比如某个dll中有一个类: 如果工程中,没有显式调用 new A(),在使用il2cpp方式构建时,这个A()会被剔除掉。最终的程序包里也就没法找到这个默认构造了。 解决办法: 1、找一个位置定义一个无用的静态实例,如 static A _unusedA = new A();这样就相当于A()被使用 阅读全文
posted @ 2017-08-21 20:04 dongzee 阅读(1783) 评论(0) 推荐(0) 编辑
摘要: 通过unity profiler测试的代码,及运行结果 using UnityEngine; using UnityEngine.Profiling; using System.Text; #if UNITY_5_5_OR_NEWER using TProfiler = UnityEngine.Pr 阅读全文
posted @ 2017-08-21 19:56 dongzee 阅读(1108) 评论(0) 推荐(0) 编辑
摘要: 以mac为例,在/Applications/Unity/Unity.app/Contents/Resources/ScriptTemplates/ 新建1个模板文件:91-C# YourNameSpaceScript-NewBehaviourScript.cs.txt 阅读全文
posted @ 2017-08-21 19:53 dongzee 阅读(459) 评论(0) 推荐(0) 编辑