- Home /
Combining Boo and C#
Hi there. In my project i am using a combination of languages - i write in Boo, but some packages i downloaded use JS or CS. The problem is that boo script doesn't know classes written in C# (The name 'MyCsClass' does not denote a valid type ('not found').). Is there a way around?
Answer by rutter · Mar 30, 2012 at 03:07 AM
Typically, scripts written in varied languages can't see each other within the same compiler pass.
Unity does execute a few passes, though. If you put scripts in "Standard Assets" or "Plugins", they will be compiled before other scripts and can be referenced by them. So long as you only need to communicate in one direction, this usually works fine.
See here for more: http://unity3d.com/support/documentation/ScriptReference/index.Script_compilation_28Advanced29.html
If you need bi-directional communication, you'll be in a tight spot. It's possible through a variety of means, but I've never found one that I'm really happy with.
Can i add assemblies by myself in monoDevelop, or am i limited to special folders that produce firstpass (plugins, standard assets, etc)
@Panga$$anonymous$$i what you mean by "add assemblies by yourself"? In any case, I think compilation order is indeed limited to special folders and, as for bi-directional, I recommend using $$anonymous$$essages: http://unity3d.com/support/documentation/ScriptReference/Component.Send$$anonymous$$essage.html - this is a perfect instance on why they exist.
Your answer
Follow this Question
Related Questions
What are Camera Types for? 1 Answer
Select a type from the inspector 0 Answers
How/Where to learn about mesh operations? (help) 1 Answer
How to combine shaders? 0 Answers