- Home /
Can I convert unityscript to boo?
Hiya all. Ive seen this fantastic snippet converter http://codeconverter.sharpdevelop.net/SnippetConverter.aspx which is OK for c# But as all UnityScript is converted to boo in its compilation process I was wondering if anyone was aware of a way to convert unityscript to boo? I imagine there should be a perfect converter (as its part of the US compilation process).
I come from a C/C++ background - have used JS/C# - but really dont like typing so much {(unnecesary,syntax)}; Having used python - I'm not going back :-) In many ways - I am starting to like boo more than python!
Answer by robbiek · Jan 28, 2012 at 06:07 PM
You can manually convert it by hand, like me. I've found no converter that'll work with unityscript to boo or js to boo. I've found unityscript to C# but often you have to fix up the C# code before even testing it, then you could take the produced C# code after fixing it up, and using the C# to boo converter.
Yes, reading and re-writing has been my method of choice (often comes out somewhat smaller looking too :) But I'm sure there must be an accurate automated way using unity (if not then there should be an easy way to make it so - assu$$anonymous$$g I am correct about the inhouse conversion of JS/US to Boo)
Not sure what you mean about "assu$$anonymous$$g I am correct about the inhouse conversion of JS/US to Boo". US is written in Boo, but it really doesn't matter what it's written in, since it's no easier to convert between them in an automated way than it is for any other languages.
I've read in quite a few places That us/js is converted to boo at compile time, then from boo to CLI.
I've never read that. US has features that Boo doesn't have, so it couldn't possibly work that way.
@Eric5h5 After an email with Unity support about compiling Boo/UJs at runtime, I got a reply from Graham saying that Boo was ported to .NET by it's creator who then also wrote a UJs to Boo converter so it could be compiled. So yes, UnityScript does get converted to Boo in order to compile it. Personally I think that's a really lazy approach, but heck... it works
Your answer
Follow this Question
Related Questions
Using Yield waitforseconds with boo 2 Answers
Why not Boo? 1 Answer
What programming language do I need to learn? 0 Answers
How do I access a variable from another GameObject? 1 Answer
Book recommendation on UnityScript? 0 Answers