2020年4月

复制代码
Debug.Log("GetTypes().Length: " + Assembly.GetExecutingAssembly().GetTypes().Length);
Debug.Log("CodeBase: " + Assembly.GetExecutingAssembly().CodeBase);
Debug.Log("FullName: " + Assembly.GetExecutingAssembly().FullName);
Debug.Log("GlobalAssemblyCache: " + Assembly.GetExecutingAssembly().GlobalAssemblyCache);
Debug.Log("Location: " + Assembly.GetExecutingAssembly().Location);


Windows-Andorid,ios
GetTypes().Length: 5383
CodeBase: file:///D:/xx/Library/ScriptAssemblies/Assembly-CSharp.dll
FullName: Assembly-CSharp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
GlobalAssemblyCache: False
Location: D:\xx\Library\ScriptAssemblies\Assembly-CSharp.dll

Mac
GetTypes().Length: 5383
CodeBase: file:///Users/xx/Library/ScriptAssemblies/Assembly-CSharp.dll
FullName: Assembly-CSharp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
GlobalAssemblyCache: False
Location: Users/xx/Library/ScriptAssemblies/Assembly-CSharp.dll

Android
GetTypes().Length: 5368
CodeBase: file:///data/app/xx/base.apk/assets/bin/Data/Managed/Assembly-CSharp.dll
FullName: Assembly-CSharp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
GlobalAssemblyCache: False
Location: data/app/xx/base.apk/assets/bin/Data/Managed/Assembly-CSharp.dll

Ios
GetTypes().Length: 5368
CodeBase: file:///private/var/containers/Application/xx/test1.app/Assembly-CSharp.dll
FullName: Assembly-CSharp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
GlobalAssemblyCache: False
Location: 
Assembly.GetExecutingAssembly()
复制代码

 

IOS上的反射是部分支持,支持使用反射读取源代码,但不支持使用反射动态生成可执行代码, 不支持以动态方式创建新的方法和类型

复制代码
// android, ios 通过
var instance1 = System.Activator.CreateInstance<TestInstance>();
var instance2 = System.Activator.CreateInstance(typeof(TestInstance)) as TestInstance;
Debug.Log(instance1.i);
Debug.Log(instance2.i);
System.Reflection.ConstructorInfo ci = typeof(TestInstance).GetConstructors()[0];
var instance3 = ci.Invoke(null) as TestInstance;
Debug.Log(instance3.i);


AssemblyName an = new AssemblyName("TestAssemblyName");
// ios平台下没有 AssemblyBuilder, android有
System.Reflection.Emit.AssemblyBuilder assemblyBuilder = AppDomain.CurrentDomain.DefineDynamicAssembly(an, AssemblyBuilderAccess.Run);
View Code
复制代码

 

 

 

https://leetcode.com/problemset/algorithms/

 

 

Inspector->Debug 可以解决 Library/metadata 文件问题

 

 

Editor.log 位置

 

 

Prefab丢失 会导致 打包闪退

 

Profiler 闪退, 关闭 Global Illumination

 

 

 

 

Git LFS

 

git lfs pull

 

 

https://www.jianshu.com/p/a67270d91fbd

 

posted on   void87  阅读(147)  评论(0编辑  收藏  举报

编辑推荐:
· Linux系列:如何调试 malloc 的底层源码
· AI与.NET技术实操系列:基于图像分类模型对图像进行分类
· go语言实现终端里的倒计时
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
阅读排行:
· 25岁的心里话
· 闲置电脑爆改个人服务器(超详细) #公网映射 #Vmware虚拟网络编辑器
· 因为Apifox不支持离线,我果断选择了Apipost!
· 零经验选手,Compose 一天开发一款小游戏!
· 通过 API 将Deepseek响应流式内容输出到前端

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示