How can I use Clojure-CLR on Unity3d?
People in the Clojure community have gotten something working.
From @swannodette "Looks like @ra and @timsgardner got Clojure running inside Unity last night"
http://f.cl.ly/items/2T2d340o0k0W2d44212G/clj2.gif
The complex answer is "maybe you can", the pragmatic answer is "no, you can't".
Sylwester suggested this is a duplicate of using it with Mono, which isn't really true, because Unity uses its own fork of Mono(one that's very old...2.6?), so something that's compatible with Mono won't necessarily have compatibility with Unity.
ClojureCLR requires the DLR(though they've been moving away from it), which means it's incompatible with Unity, since the DLR requires Mono 2.8+.
That said it's possible to add the DLR as a dependency, and to compile ClojureCLR to .dlls and access it from Unity, this is what I did, however my experience was that I could get a lot of my code to run fine in the development environment, but when I'd build the game, everything would break, it'd just ignore the Clojure stuff.
If Unity moves to a higher version of Mono, or ClojureCLR gets rid of dependence on the DLR, I don't see any reason Unity couldn't support it, and I actively look forward to it. But for the moment, it's not practical.
If a work-around exists(and it probably does), I never managed to figure it out.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With