I’ve been playing around with Unity 3D lately, and its pretty awesome. Its not very difficult to make the leap from Flash to Unity. However, one detractor to Unity is its poor coding environment.
As a Flash programmer, I’m very spoiled by several of the development environments available to me. FlashDevelop, Flex, etc. all provide intelligent editors that give me code completion. Unity’s built in editor does not have this feature. Once you get used to code completion, you can never go back to a plain text editor!
The good news is that you can use Visual C# 2008 Express for all of your Unity coding needs, and its totally free! Thanks, Bill Gates.
Below are the steps to set up your environment. Have fun. Don’t say I never gave you anything.
One time setup:
1. Download Visual C# 2008 Express for free:
2. Install it.
3. Download the following file, which is needed for tool tips as you edit in C#.
Place the 2 XML files here:
(or wherever you installed Unity)
Repeat for each project:
1. When you create a new Unity 3D project, you need to create a new C# project somewhere in the Assets/ directory. It can be right in Assets/, or you can make a sub directory. Making a sub directory might be cleaner as C# will create solution files, etc. Use “Empty Project” as your project type in C#.
2. Add a reference to the Unity dll files in your C# project.
In C#’s Solution Explorer panel (on the right), right-click the project and choose “Add Reference”.
Browse to and add UnityEngine.dll.
(you can add the editor dll as well if you are going to write editor code)
3. Create new class files from within C#. If you do it from Unity, they don’t show up automatically in your C# project (there is probably a way to add them, but I don’t know it).
Code completion, tool tips, hints… it’s all there.
C#, Unity 3D