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);
}
}