about mono and building of unity projects

Hi guys, just a quick background about my project.

I’m building a system where my users can type c#-style math formulas into small a 3d party api (c#). When the user is finished with the formulas, he needs to click on a button that will parse his formulas into a c# file (that part is done and works fine). What did now, was to create dll out of this c# file and then load it dynamically into my Unity application. So what is the problem if all of this is working fine?

Well, the only way I could build the dll was to use the mcs tool provided with the mono installation and it only works when this file is in it’s default installation directory. Does this mean that I will have to let my user install mono!!! What could be a workaround for this, there must be something I can do, but my knowledge about mono and the way it runs is not good.

Thanks for anyone that could help me.

I ran into another problem just now. When I try to build a dll from a cs file that instantiate other scripts, I get an arror “type or namespace objectBehaviour could not be found” where objectBehaviour is a component that I’m instantiating in the dll wannabe file.

I don’t work with mono develop, but I’ve used numerous third-party DLLs with Visual C# 2010 in conjunction with Unity. Infact, in one case, I did something very similar to what you have described.

Created my third party DLL which referenced another third party DLL and then put everything into the plugins folder. It worked. Make sure both your DLL and the third party you are referencing are in the Plugins folder.

Thanks for answer andorov

But just one thing I’m missing, will your solutions help with the actual building of the dll or just the running of it? I’m asking this because my problem is not in the actual running of the dll, but in the building process where I get the “type or namespace …” error as mentioned above.

Thanks

Ok, so I have this working sortoff, anyway. All I need now is to know how can I refence a script component from my assembly. Here is an example from one line of code in my assembly and is is (understandably) complaining about the obBehaviour, since it can’t find it. The result is that the dll won’t compile:

obBehaviour temp0 = GameObject.Find(“block1”).GetComponent();

However, if I put in the following line of code, it works, I assume because it does not reference any script object

GameObject.Find(“block1”).transform.position += new Vector3(0.001F, 0, 0);

Can anyone give me a hint?

obBehaviour temp0 = GameObject.Find(“block1”).GetComponent();

Should i think be:

obBehaviour temp0 = GameObject.Find(“block1”).GetComponent(“obBehaviour”);

Thanks diddy, but I tried that and as I suspected no joy. The problem is that this code resides in an assembly and I need to get the assembly to see the obBehaviour.cs component.

bump