void OnApplicationQuit() { OnApplicationQuitAction?.Invoke(); ILRuntimeHelp.Dispose(); GC.Collect(); }
private void Start() { DontDestroyOnLoad(gameObject); if (ILRuntimeCodeLoadMethod == AssetLoadMethod.StreamingAsset) { StartCoroutine(ILRuntimeHelp.LoadILRuntime(OnILRuntimeInitialized)); } else { //不直接调用 Hotfix.HotfixLaunch.Start 是防止编译dll的时候找不到 Hotfix部分的Hotfix.HotfixLaunch类而报错 var assembly = Assembly.GetExecutingAssembly(); var type = assembly.GetType("Hotfix.HotfixLaunch"); var method = type.GetMethod("Start", BindingFlags.Public | BindingFlags.Static); method.Invoke(null, new object[] { false }); } }