- Home /
Extending unity with custom code
Hi,
There are going to be times when unity does not cover the needs of the product as so needs to be extended using C/C++. An example of this is using 3rd party middleware or APIs. I understand this is accomplished via DLLs on the Windows platform, but how will it be accomplished with regards to the consoles, short of purchasing a license to have full access of the source code?
I tried to search for any info on this and couldn't find any.
Any insight would be most helpful.
Thanks
I'm not definite on this so I'm not submitting an answer, but I think since Unity compiles everything in the end it just gets taken care of, regardless of the target platform. If you build your plugin and add it via the "Plugins" directory in your "Assets" directory it should be compiled into the final executable.
Answer by Mike 3 · Jul 22, 2010 at 04:02 PM
I don't think you're going to get a proper answer here - there is an NDA for details about the console development side of Unity, so you'll most likely need to talk to sales@unity3d.com to see if they can answer it
Answer by jashan · Jul 22, 2010 at 05:14 PM
Actually, I think cases where you really need to extend Unity with C/C++ are very rare as Unity already is very open with its Mono/.NET scripting approach (like, you can easily include SmartFox or Photon as 3rd party networking libraries - without even the need to use C/C++ and the possibility to have these run in the Web player).
However, if you really need it for console development, I'm pretty sure there are ways. As you mentioned: It works with DLLs on Windows. It also works on the Mac, and I think it also works on the iPhone. So, it would really surprise me if they didn't have a convenient way to handle this for console development, too.
$$anonymous$$any times you might want to do performance-heavy stuff on c++. For example, I have a case where I need to build a mesh from voxels practically real-time. Currently, reading 10x10x64 voxel data and building a mesh from it takes approximately a second. I'm pretty sure I can push it into real-time if I use a dynamic library.
Your answer

Follow this Question
Related Questions
Terrain Editor on a sphere. 2 Answers
tile scriptable object lost its content 0 Answers
Tool to make ONE flat sized mesh from a png/texture? 5 Answers
How do I add editor extensions to Unity? 1 Answer
Real time scene changes 1 Answer