I'm attempting to use eval() in a JavaScript script attached to an empty game object in my game, in the hope that I'll be able to play my game and make changes as I go along to speed up the refining process a bit (I know they won't be saved but at least I'll know what to do).
My script is pretty simple at the moment, I'm just testing it out. However, even this simple call gives me the error:
CompilationErrorsException: script(1,1): BCE0055: Boo.Lang.Compiler.CompilerError:Internal compiler error: Boo.Lang.Compiler.TypeSystem.BuiltinFunction. ---> System.NotSupportedException: Boo.Lang.Compiler.TypeSystem.BuiltinFunction
at Boo.Lang.Compiler.TypeSystem.EntityExtensions.DisplayName (IEntity entity) [0x00000] in :0
at Boo.Lang.Compiler.CompilerErrorFactory.DisplayStringFor (System.Object o) [0x00000] in :0
...(and more)
And my code is :
function OnGUI() {
GUI.BeginGroup(Rect(10, 10, 450, 150));
GUI.Box(Rect(0, 0, 450, 150), "Command Panel");
// code = GUI.TextField(Rect(10, 10, 430, 30), code);
GUI.EndGroup();
if (Input.GetKeyDown (KeyCode.Return)) {
eval('Debug.Log("Test");');
}
}
I've tried my best to research what's going wrong but I can't find any other cases of this problem using the eval() function; most are with internet services. I've seen that the error is said to be at `script(1,1)` which makes me think that I've left something out at the start, but as soon as I remove the eval() function it's fine.
Any ideas?
↧