zoukankan      html  css  js  c++  java
  • 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:xxLibraryScriptAssembliesAssembly-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

  • 相关阅读:
    sun.misc.BASE64Encoder----》找不到jar包的解决方法
    javax.validation.UnexpectedTypeException: HV000030: No validator could be found for constraint-实体报错
    避免MQ消息重发的简单实现思路
    使用Spring的@Scheduled实现定时任务参数详解
    重置密码解决MySQL for Linux错误 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
    安装mysql zip5.7版--安裝
    bzoj3983
    bzoj4044
    bzoj1064
    bzoj4042
  • 原文地址:https://www.cnblogs.com/revoid/p/12606139.html
Copyright © 2011-2022 走看看