- Home /
What are all the special folders and what do they do?
There are special folder names that imply functionality, such as Resources, Editor, Plugins.
I can't find a list of these anywhere, and I would also like to know their functionality and any precedence, if applicable. For example, if Editor is supposed to limit to the editor, and Resources is supposed to be automatically included, what happens to items in Editor/Resources/, or Resources/Editor?
@$$anonymous$$olix, remember to checkmark the best answer (assu$$anonymous$$g it's right), and/or upvote good answers.
I was stalling until Duck merged them into one, and in case anyone else knew of others or their nesting behaviour, since I assumed that once it was 'answered' it would essentially disappear, but after reviewing the faq I suppose I should check 'helpful' answers.
Answer by duck · Jun 07, 2010 at 04:32 PM
Resources
The Resources folder is a special folder which allows you to access resources by name in your scripts, rather than by the usual (and recommended) method of direct references. For this reason, caution is advised when using it, because all items you put in the resources are included in your build (even unused assets), because Unity has no way of determining which assets may be used by your project.
Editor
The Editor folder name is a special name which allows your scripts access to the Unity Editor Scripting API. If your script uses any classes or functionality from the UnityEditor namespace, it has to be placed in a folder called Editor (or a subfolder).
Plugins
The "Plugins" folder is where you must put any C, C++ or Objective-C based Plugins which should be included with your project. Plugins are a pro-only feature.
Compilation Order
These special names (and a few others) also determine the compilation order, which is useful to know if you are mixing languages in your project (i.e. using C# and Javascript scripts in the same project), so sometimes you might see the suggestion to put a script in a folder called "plugins" just for this purpose.
As for mixing these folders, eg "Editor/Resources"... I'm not sure - it doesn't really make a lot of sense to do that. I think it's generally better to just understand what each special folder's purpose is and use them individually!
Thanks Duck. What about Gizmos? Are there others? It would be really useful to have a complete list.
I believe Plugins is no longer pro-only. Also, you can also place Java based Plugins in there.
Answer by qJake · Jun 07, 2010 at 10:32 PM
Duck: Feel free to append this to your answer (I would have just edited your post, but it's not marked as a wiki ;)
Gizmos
The gizmos folder holds all the texture/icon assets for use with Gizmos.DrawIcon(). Texture assets placed inside this folder can be called by name, and drawn on-screen as a gizmo in the editor.
Thanks. Actually it seems that the top-most level is not the only factor. For example, Editor/Resources behaves like Resources/, i.e. the items in it are included automatically in the build (this is actually the reason I started the thread; I noticed editor skin files in my build log). Another example is Plugins/Editor, which are not compiled in, like Plugins/.
Hm, interesting, didn't know that. Someone should test these all out and make a post about it. ;)
I'm confused - where are these folders? Are these in the app bundle or somewhere else?
These folders are in the editor- they don't map to anything you can easily see in the finished build.
Answer by Mario · Oct 03, 2012 at 06:49 PM
WebPlayerTemplates is used to replace the default web page used for web builds
Answer by thienhaflash · Sep 20, 2011 at 09:57 AM
There are another special name you should never use is Assets, which make Unity confuses with the root Assets folder. That means once you create a folder with the name Assets then quit then open Unity again. All the things on your project panel are gone. It's actually not, just because Unity thinks that your Assets folder (which is empty) is its root Assets folder. Close Unity and change the name for that Assets folder will bring you back to where you are before after restart Unity.
Hope it helps. I had a hard time figuring out why all my stuffs disappear, and there are tons of missing material alerts showed up.
Answer by Ghisallo · Oct 09, 2012 at 07:31 PM
Standard Assets folder. Scripts placed in this folder will be compiled first, as I understand it. Put C# scripts in here if you want Javascript to reference them.
http://answers.unity3d.com/questions/292413/need-to-put-my-script-in-standard-assets-folder.html