InjectFix real machine hot repair error can not load method xxx

When the real machine is undergoing hot repair, an error of can not load method xxx appears.

The specific error reporting method is Resources.FindObjectsOfTypeAll. This function is called in the [Patch] repair method. The local running can run normally, and clicking Fix can generate the patch package normally. But when it is actually on the real machine, the error can not load method Resources.FindObjectsOfTypeAll is reported when repairing, and the patch cannot be applied normally.

Go to issues #33 of the author's git repository to find the answer to the relevant question. The following is the author's reply:

So the reason for the failure to repair is that the package body to be repaired did not call Resources.FindObjectsOfTypeAll, and Unity cut out the corresponding method when packaging. Regarding the stripping code, the relevant option is Build Settings->Player Settings->Strip Engine Code. To avoid clipping some functions, you can refer to the content related to Unity configuration link.xml

Guess you like

Origin blog.csdn.net/shaobing32/article/details/122940886