I want to make a game where players can hack to beat the game, it's possible to beat fairly but its absurdly hard. I want players to be able to write their own UnityScript/JavaScript and import it into the game and attach it to any gameObject they want. I know I can let them write some code in a text field and then use eval() to run the code, but that's not what I want, I want them to be able to attach said script to a gameObject in run time. Is there anyway to do this? They don't need to write it in run time, simply so that they can import the .js file and have the game recognize it as a script. If so how would I do that?
↧