Exemplo n.º 1
0
        public void LoadHotfixAssembly()
        {
            TextAsset dllAsset = AssetManager.Instance.LoadAsset <TextAsset>("Unity.Hotfix.dll", ".bytes", false, true, AssetType.DLL);

#if Release
            assembly = AppDomain.CurrentDomain.Load(RijndaelUtil.RijndaelDecrypt("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", dllAsset.bytes));
#else
            TextAsset pdbAsset = AssetManager.Instance.LoadAsset <TextAsset>("Unity.Hotfix.pdb", ".bytes", false, true, AssetType.DLL);
            assembly = AppDomain.CurrentDomain.Load(RijndaelUtil.RijndaelDecrypt("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", dllAsset.bytes), pdbAsset.bytes);
#endif
            typeList = assembly.GetTypes().ToList();
            OnHotfixLoaded();
        }
Exemplo n.º 2
0
        public void LoadHotfixAssembly()
        {
            TextAsset    dllAsset = AssetManager.Instance.LoadAsset <TextAsset>("Unity.Hotfix.dll", ".bytes", false, true, AssetType.DLL);
            MemoryStream dll      = new MemoryStream(RijndaelUtil.RijndaelDecrypt("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", dllAsset.bytes));

#if Release
            appDomain.LoadAssembly(dll, null, new PdbReaderProvider());
#else
            TextAsset    pdbAsset = AssetManager.Instance.LoadAsset <TextAsset>("Unity.Hotfix.pdb", ".bytes", false, true, AssetType.DLL);
            MemoryStream pdb      = new MemoryStream(pdbAsset.bytes);
            appDomain.LoadAssembly(dll, pdb, new PdbReaderProvider());
#endif
            InitializeILRuntime();
            OnHotfixLoaded();
        }