I have some c# code , which uses some things which dont work in unity, like .NET 4.0 , so i can only compile it outside of unity. Is there a possibility to import that into unity and call some funktions in the code? Maybe make unity start the exe and then send and recieve data from it? or import it as Dll?
Of course - just drag the compiled DLL into your project like any other asset and you can call into its functions as usual: Unity - Manual: Managed plug-ins
Import as DLL will help you. But it must be compiled in .NET 2.0.