mirror of
https://github.com/sirjonasxx/G-Earth.git
synced 2024-11-23 00:40:51 +01:00
Attempt unity fix
This commit is contained in:
parent
76acc8b391
commit
6db7c31bfa
@ -114,10 +114,12 @@ public class UnityWebModifyer {
|
|||||||
|
|
||||||
contents = insertFrameworkCode(contents, 0, "js_code/unity_code.js");
|
contents = insertFrameworkCode(contents, 0, "js_code/unity_code.js");
|
||||||
|
|
||||||
|
// String exportSearch = "Module.asmLibraryArg,buffer);Module[\\\"asm\\\"]=asm;";
|
||||||
String exportSearch = "Module[\"asm\"][\"Fj\"]).apply(null,arguments)};";
|
String exportSearch = "Module[\"asm\"][\"Fj\"]).apply(null,arguments)};";
|
||||||
int exportIndex = contents.indexOf(exportSearch) + exportSearch.length();
|
int exportIndex = contents.indexOf(exportSearch) + exportSearch.length();
|
||||||
contents = insertFrameworkCode(contents, exportIndex, "js_code/unity_exports.js");
|
contents = insertFrameworkCode(contents, exportIndex, "js_code/unity_exports.js");
|
||||||
|
|
||||||
|
// String importSearch = "if(!env[\"tableBase\"]){env[\"tableBase\"]=0}";
|
||||||
String importSearch = "\"LANG\":lang,\"_\":getExecutableName()};";
|
String importSearch = "\"LANG\":lang,\"_\":getExecutableName()};";
|
||||||
int importIndex = contents.indexOf(importSearch) + importSearch.length();
|
int importIndex = contents.indexOf(importSearch) + importSearch.length();
|
||||||
contents = insertFrameworkCode(contents, importIndex, "js_code/unity_imports.js");
|
contents = insertFrameworkCode(contents, importIndex, "js_code/unity_imports.js");
|
||||||
@ -141,6 +143,7 @@ public class UnityWebModifyer {
|
|||||||
byte[] encoded = Files.readAllBytes(Paths.get(loaderFile.getAbsolutePath()));
|
byte[] encoded = Files.readAllBytes(Paths.get(loaderFile.getAbsolutePath()));
|
||||||
String contents = new String(encoded, StandardCharsets.UTF_8);
|
String contents = new String(encoded, StandardCharsets.UTF_8);
|
||||||
|
|
||||||
|
// contents = contents.replace("o.result.responseHeaders[e]==s.getResponseHeader(e)", "false");
|
||||||
contents = contents.replace("r.headers.get(e)==t.headers.get(e)", "false");
|
contents = contents.replace("r.headers.get(e)==t.headers.get(e)", "false");
|
||||||
// contents = contents.replace("a.responseHeaders[e]=o.getResponseHeader(e)",
|
// contents = contents.replace("a.responseHeaders[e]=o.getResponseHeader(e)",
|
||||||
// "const genRanHex = size => [...Array(size)].map(() => Math.floor(Math.random() * 16).toString(16)).join('');\n" +
|
// "const genRanHex = size => [...Array(size)].map(() => Math.floor(Math.random() * 16).toString(16)).join('');\n" +
|
||||||
|
Loading…
Reference in New Issue
Block a user