Here’s my situation: my team and I really want to use Unity for a game we’re building; unfortunately, our engineer really needs to do a project in C++ to develop his portfolio.
So we’d all but given up hope on Unity, but I’ve had a couple people tell me that there is a plugin that will allow C++ scripting in Unity. One told me that it basically converts the C++ to C#.
I’m no engineer, so I have no idea how realistic that is, but I figured I’d ask: Is there such a plugin? Some quick Google searches didn’t turn up anything for me.
Thanks in advance!
Plugins just do what the name implies.
Plug in and add new functionality.
There is no “C++ to C#” conversion or anything alike.
But game play functionality and hookup requires you to use C#, JS or Boo
If he wants to do a C++ focused 3d application for his portfolio, using Irrlicht, OGRE, C4 or TGEA is a much better starting point I fear. As C++ programmer in Unity you primarily add new functionality not present otherwise.
Question is: why the focus on C++ only?
C# is an important language too for a programmer portfolio and will become more and more important for development.
It should be mentioned that Unity Pro does support C, C++, and Objective-C natively. More info here:
They won’t work on the web-player, but if you really want the power/speed of compiled C++, I’m guessing you’ll be targeting stand-alone, iPhone, or Wii anyway.
I’m not sure if you’ll still have to write UnityScript/C#/Boo to get it to talk to your game or if the C++ API has the access to in-game stuff. Hope this helps!
Yes you have
You can not access unity from plugins
What I wrote above actually is for plugins.
Without plugins you can not work with anything else than C#, Unityscript or boo at all.
Ah. That makes sense. In the interest of promoting Unity, I’d recommend you figure out which components of the project could be done in C++ without having to rely on any Unity APIs (i.e. FSMs, graphics processing, complex AI code, etc.) and plan on using Unity to hook in the C++ code.
Depending on what you’re making it could be a fairly optimal way to prove out a concept in C++ without having to worry about GL, physics, shaders, etc!
Thanks for the quick responses, guys! I think that we’re going to take a route similar to the one you suggest, Slippy; develop in Unity, but allow room for him to create some C++ based plugins for portfolio reasons.