- Home /
Design/discussion question
I have a doubt about the use of Compilers in Unity and how to handle the error
Good Afternonn, i have some questions related to a work project that i'm doing in college. I'm rewriting in Unity a game that a colleague of mine made some time ago, he used C#. In this game the primary objective is that the user(students) will put the code in a text area, this text will be write there using C, after that, the compiler take the code and verify it for errors, if there is none the game continues and the action takes place, much like some games focused in the control of characters using code. The Question is, how can i make the code i write in the text area, pass to MingW (what was used and will be carried over to the new one), and them take them to do the action in the game? The second question, is there a way to make a Draggable Text Area, or just the standard text area? Thanks in advance for your answers friends :)
this is probably better suited to the forums, but since i'm reading...
how was the text passed in the original? it might make sense to follow that too.
there's no reason why you can't simply save it as a text file (with the correct extension), invoke $$anonymous$$gw then (assu$$anonymous$$g no errors) call whatever function you need. for unity (and maybe your original) you might need some wrapper function which is exposed so unity knows what to call but there shouldn't be anything crazy.
regarding a draggable text area, it depends on what you're expecting to drag into it but unity can handle draggable items...