From f08a0f5a8174b752fa4970747e12cbe782f13718 Mon Sep 17 00:00:00 2001 From: johnche Date: Thu, 19 Dec 2024 11:47:53 +0800 Subject: [PATCH] =?UTF-8?q?[unity]=E7=94=B1=E4=BA=8Eplugin=E5=B7=B2?= =?UTF-8?q?=E7=BB=8F=E5=90=88=E5=B9=B6=EF=BC=8C=E7=94=B1plugin=E6=8F=90?= =?UTF-8?q?=E4=BE=9B=E7=9A=84=E6=8E=A5=E5=8F=A3=E5=8F=AF=E4=BB=A5=E5=90=88?= =?UTF-8?q?=E5=B9=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../core/upm/Runtime/Resources/puerts/init_il2cpp.mjs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/unity/Assets/core/upm/Runtime/Resources/puerts/init_il2cpp.mjs b/unity/Assets/core/upm/Runtime/Resources/puerts/init_il2cpp.mjs index 54506858fc..dd2596c3ff 100644 --- a/unity/Assets/core/upm/Runtime/Resources/puerts/init_il2cpp.mjs +++ b/unity/Assets/core/upm/Runtime/Resources/puerts/init_il2cpp.mjs @@ -75,10 +75,13 @@ puer.getGenericMethod = function(csType, methodName, ...genericArgs) { return puer.createFunction(...overloadFunctions); } -puer.getLastException = function() { - // todo +puer.getLastException = global.__puertsGetLastException +global.__puertsGetLastException = undefined; + +puer.evalScript = global.__tgjsEvalScript || function (script, debugPath) { + return eval(script); } -puer.evalScript = eval +global.__tgjsEvalScript = undefined; let loader = jsEnv.GetLoader(); // function loadFile(path) {