Quantcast
Channel: Questions in topic: "javascipt"
Viewing all articles
Browse latest Browse all 1875

Nested eval and generated eval fails on windows

$
0
0
Hi. Nesting eval() or trying to call eval form generated code fails with the following error on windows: UnityScript.Scripting.CompilationErrorsException: script(1,1): BCE0167: Boo.Lang.Compiler.CompilerError: Namespace 'UnityEngine' not found in assembly 'UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' script(1,1): BCE0021: Boo.Lang.Compiler.CompilerError: Namespace 'UnityEngine' not found, maybe you forgot to add an assembly reference? it works fine on linux though. Is there any way to fix it? Here is the code to reproduce this issue: static function evalNested() { return eval("eval(\"1+1\");"); } static function evalDelegated() { evaler = eval("class Foo { function evaluate(str) { return eval(str);}}; new Foo();"); evaler.evaluate("1+1;"); } function Start() { Debug.Log("******testing eval*******"); try { evalNested(); } catch(e){ Debug.Log("BRONK nested"); Debug.Log(e); } try { evalDelegated(); } catch(e){ Debug.Log("BRONK delegated"); Debug.Log(e); } }

Viewing all articles
Browse latest Browse all 1875

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>