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) {