Hi,
Don’t shoot if this question sounds stupid, but I would need something similar.
If I have compiled a unity application (standalone) can I then tell this application to load a .js file (not in the application, the .js file is just also on the disk) and run its contents in any way ?
Regards,
Bart
I think you may be able to with JS’s eval() function. So, what you’d do is read the JS file as a text file, store the whole file as a string in a variable, then pass the variable as the argument to eval().
Unity’s Javascript might have something builtin for this, like Boo (since the creator of Boo was hired by UT to write the JS implementation).
http://boo.codehaus.org/Boo+as+an+embedded+scripting+language
I think there also may be something something like that similar for C# directly provided in the Mono framework, but I can’t find any documentation…