- Home /
I used the eval() function on web player
In aim to make an unity3d webtutorial for beginners, I wanted to evaluate user-code, written in an GUI-textfield, executed by Button.
var userInput = "cube.transform.position.x = 1;" //just for testing
var cube : GameObject;
function Start(){
cube = GameObject.FindGameObjectWithTag("Finish");
}
function ExecuteButton(){
eval(userinput);
}
It worked fine on my local machine, but the web-player crashes each time. Anyone has an solution for me?
Comment
Your answer
Follow this Question
Related Questions
turn string into function with arguments? 1 Answer
Why do I have to click GUI Menu twice to start in Web player? 0 Answers
Texture resolution in Web Build drastically drops 1 Answer
Off Screen GUI, taking a screenshot into a Info style card (Easy :)_) 1 Answer
Getting text from web and show on GUI? 2 Answers