Bug fixes Unity Under artifact, Tencent InjectFix open it!

640?wx_fmt=png

Bug fixes Unity Under artifact InjectFix open it!

InjectFix simple to use, compact, compliance and security, through a number of project applications feedback is very good, even if you do not plan to use it to update the online version, as long as you have a native part of the program, access can also improve the efficiency of the development to some extent.

InjectFix Highlights:

1. Direct modified C # on the Unity project to update; old projects without modifying the original code to work with;

2. Update the terms more in line with Apple's hot;

3. Each game format a private patch, security more secure.

InjectFix those things

Heat more programs Smash Bros.

All the more heat ios support programs have one thing in common: After the update code is parsed execution.If their resolve to execute before the update can be divided into two categories:

One is even certain modules are used throughout the game to perform parsing. This is the most traditional way, all currently available mainstream programs (xLua, slua, tolua, ILRuntime , jsb etc.) are supported in this way.

this way:

1. Some will be more or less intrusive;

2. Based on performance, convenience and other implementation considerations, generally run in native mode in the game, the native code to run out of the bug, in this embodiment is powerless;

3. If you are using a dynamically typed scripting language, code maintenance will bring difficult issues;

4. You can add features, some games and even download can be done, do not follow the whole package update.

Another one is natively, if bug, redirected to the new logical, parsing logic execution.

this way:

1. Low-invasive, post-project can also be used;

2. Logical native normal run, there is a problem to resolve only a partial handover execution, the performance is better;

3. The code segments can cause an increase, increasing the number of classes proportional to the injection;

4. This embodiment is often difficult to add functions.

The second way is the focus of the following discussion, for convenience we call "hot fix" hot fixes the earliest maturity of the program is to provide xLua, after two years of use has gradually been accepted, tolua # later joined this function, there are some users based ILRuntime had a hot repair.

What is InjectFix

InjectFix is a hot fix to achieve . That it and other hot-fix solutions, what difference will it make?

Imagine such a scene, we have a function of a thousand lines of code, there is a line there is a problem, we need to fix it. If xLua, lua need to re-implement this function again, the heavy workload. And on hot fixes ILRuntime, because of its patch is another assembly, it can not directly access private members of the original class, so that 999 lines of code generally can not normally be used directly, more needs to be done to modify. The InjectFix not need to use lua, do not need to like ILRuntime hot fixes as another project to build a thousand lines of logic weight to achieve that. Just need to get rid of this line of code directly in Unity original project, and make note of this function can be updated.

InjectFix there are other advantages:

1. running very small, only about 100K, compared lua each program, ILRuntime to be much smaller, and does not rely on third-party libraries, pure C # achieve;

2. Support Each game generates a patch its own proprietary format, the definition of private instruction. Such code is compared to the original universal lua, lua bytecode, clr assemblies are safer.

3. Support to repair dll outside the Assembly-CSharp.dll.

4. Free code generation, cleaner.

It has its drawbacks, it does not support the new class, nor does it support the new field in existing classes, repair bug, or enough, but the game is more difficult to pass through the hot new features. InjectFix on a pure bug repair tool.

Black &

Due to repeated loading InjectFix support patch, a new patch will be automatically loaded on a cover, this feature can be used to achieve real machine code logic modified in real time.

Apple policy compliance

One of the highest population of solutions is more a problem of the heat Question Frequency: This program will not lead my game is not reviewed by Apple. Let's take a look at Apple's hot update provisions:

640?wx_fmt=png

You can see the latest provisions allowing download code analysis execution, but the premise is not through new features and functionality to the program change was (and when compared to the audit) beyond recognition. Look at the grounds when usually rejected in Guideline 2.5.2 in the sentence: Your App, Extension, or linked Framework the Appears to Contain code with the Designed Explicitly at The Capability to Change your App's behavior or the After App Review Approval functions on this page. There are "new features and capabilities," the ability of the embarrassment hot update program that has the ability to "changed beyond recognition" of. The InjectFix from its ability to provide (only modify the existing function) point of view, it does not have the ability to "New features and functionality," which was originally weakness on here has become a guarantee of compliance.

Do projects need to listen carefully, continuous improvement based on feedback. Open source can help to hear more voices, to better improve this project in the future.

InjectFix officially open

Github Open Source Address:

https://github.com/Tencent/InjectFix

(Click to read the original text at the end direct access)

Please give InjectFix a Star!

We welcome your issue and PR!

InjectFix domestic mirror address: https: //git.code.tencent.com/Tencent_Open_Source/InjectFix

(Login to access public project)

640?wx_fmt=png

Tencent worker bees source system to provide a complete open-source developers, the latest domestic image Tencent open source project




640?wx_fmt=jpeg

Published 43 original articles · won praise 17 · views 50000 +

Guess you like

Origin blog.csdn.net/tencent__open/article/details/100789546