• 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

  • 相关阅读:
    系统学习(javascript)_基础(语法)
    系统学习(javascript)_基础(数据类型之间的转换)
    系统学习(javascript)_基础(数据类型一)
    npm_一个有意思的npm包
    java_环境安装(window10)
    window10_使用技巧
    剑指Offer_编程题_16
    剑指Offer_编程题_15
    剑指Offer_编程题_14
    剑指Offer_编程题_13
  • 原文地址:https://www.cnblogs.com/revoid/p/12606139.html
Copyright © 2020-2023  润新知