- Home /
The question is answered, right answer was accepted
Why is the unity folder so cluttered with IDE files
Whenever I create a new Unity project, add a C#
script file and synchronize it with an external source code editor, there appears a number of .sln
and .csproj
files generated in the main project folder.
I wouldn't bother it wasn't for the fact that there's 6 x .csproj
and 2 x .sln
with names like:
Assembly-CSharp.csproj
Assembly-CSharp-Editor.csproj
Assembly-CSharp-Editor-vs.csproj
Assembly-CSharp-firstpass.csproj
Assembly-CSharp-firstpass-vs.csproj
Assembly-CSharp-vs.csproj
After a solution is opened automatically by Unity, it has 3 projects with pretty similar structure - every project has an Assets
folder, but seems to include a different permutation of assets.
Whether I use VS or MonoDevelop doesn't matter. The question is:
Is this a standard project structure or did I get something wrong? Is it possible to reduce the clutter, which makes me unsure which project I should be working on, or are all these files necessary?
The reason I'm asking is there seems to be a lot of redundancy and it's not very clear what each of these projects is responsible for.
Answer by stevethorne · May 02, 2014 at 01:26 PM
This is the standard solution structure for a Unity project. Each one can have a number of projects in the solution. Mine usually have 6 projects in the solution. You didn't do anything wrong, and there's nothing you can do to reduce this. These are needed for both unity and the IDE that you're using.
If you're wondering why they do this, it's due to the fact that they need to make sure that things get compiled in the correct order. You can take a look at this page for more details on the compile order. That might also help you understand what's put in each project.
For those not wanting to go searching for what's in each project, here's a basic synopsis:
Assembly-CSharp-firstpass.csproj
contains the files in the StandardAssets folder.
Assembly-CSharp.csproj
contains the files outside of the Editor folder.
Assembly-CSharp-Editor.csproj
contains the files inside of the Editor folder.
The projects that replace "CSharp" with "UnityScript" contain the Unity Script files in the same manner.
As for the ones ending in -vs, I'd imagine those are for the visual studio projects.
Thanks for an informative answer, strictly to the point. However, there's no way for me to vote this up (not enough rep).
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
.csproj not being created 1 Answer
Project .sln Generates Incorrectly (Contains Duplicate Projects). 1 Answer
Visual Studio + Analyzers 1 Answer