All the special folders in Unity

Source: Internet
Author: User

1. Hide Folders
Folders with a. Start will be ignored by unity. Resources in this folder will not be imported and the script will not be compiled. Also does not appear in Project view.
2. Standard Assets
The script in this folder is first compiled.
The scripts in this folder will be exported to Assembly-csharp-firstpass, Assembly-unityscript-firstpass or Assembly-boo-firstpass projects, depending on the language.

Refer to http://docs.unity3d.com/Documentation/Manual/ScriptCompileOrderFolders.html.

The

script in this folder is compiled first than any other script. Put the script in this folder, you can use C # script to access JavaScript scripts or other language scripts.
3. Pro Standard Assets
is the same as standard Assets, except that the files in it are for the Pro version of Unity.
4. Editor
Folders named in editor allow scripts in the Unity editor to access the API. If a class or method in the Unityeditor namespace is used in the script, it must be placed in a folder named editor. Scripts in the Editor folder are not included in the build. The
can have multiple editor folders in the project.
Note: If you are in a normal folder, the Editor folder can be at any level of the directory. If you are in a special folder, the Editor folder must be a direct subdirectory of the special folder.
5. Plugins
Plugins folder is used to put native plug-ins. They are automatically included in the build. Note This folder can only be a direct subdirectory of the assets folder.
under the Windows platform, the native plugin is a DLL file; under Mac OS x is the bundle file; under Linux, the. so file.
like standard assets, the scripts here are compiled earlier, allowing them to be accessed outside the script.
5.1. plugins/x86
If you create a game for a 32bit or 64bit platform, the native plugin file under this folder is automatically included in the game build. If this folder does not exist, unity will look for native pluglins under the Plugins folder.
5.2. plugins/x86_64
If you create a game for a 32bit or 64bit platform, the native plugin file under this folder is automatically included in the game build. If this folder does not exist, unity will look for native pluglins under the Plugins folder.

If you are creating a universal build, it is recommended that you use both folders. Then put the 32bit and 64bit native plugins into the appropriate folder.
5.3. Plugins/android
Put the Java.jar file in this folder. The plugins. So file used in the Java language is also included. Refer to http://docs.unity3d.com/Documentation/Manual/PluginsForAndroid.html
5.4. Plugins/ios
A limited, simple-to-automatically add (as symbolic Links) any. A,. M.,. mm,. c, or. cpp files into The generated Xcode project. seehttp://docs.unity3d.com/documentation/manual/pluginsforios.html
If You need more control what to automatically Add files to the Xcode project, your should make use of the of the Postprocessbuildplayer feature. Doing so does don't require you to place such files in the Plugins/ios folder. seehttp://docs.unity3d.com/documentation/manual/buildplayerpipeline.html

The

6. Resources
Sources folder allows you to access the resource through the file path and name in the script. However, it is recommended to use direct references to access resources. The
resource placed in this folder is always included in the build, even if it is not used. Because unity cannot tell if the script has access to its resources.
You can have multiple resources folders in your project, so it is not recommended to place a resource with the same name in multiple folders.
Once the build game is in place, all resources in the resource folder are packaged into the archive of the game's storage resources. In this way, the resources folder does not exist in the build of the game. Even though the script still uses the path of the resource in the project.

Reference http://docs.unity3d.com/Documentation/Manual/LoadingResourcesatRuntime.html
Note: When a resource is accessed as a script variable, these resources are loaded into memory after the script is instantiated. If the resource is too large, you may not want it to be loaded like this. Then you can put these large resources into the resource folder and load them through resources.load. When these resources are no longer used, you can release the memory by destroy the object and then calling Resources.unloadunusedassets.
7. Editor Default Resources
This is the folder used for the editor script.
8. Gizmos
The Gizmos folder holds the map and icon resources used by the Gizmos.drawicon method. The map resource placed in the Gizmos folder can be used directly by name and can be drawn on the screen by editor as a gizmo.
9. Webplayertemplates
The default Web page used to replace the Web build. None of the scripts in this folder will be compiled. This folder must be a direct subdirectory of the assets folder.
Ten. Streamingassets
The files here are copied to the build folder and are not modified (the mobile and web versions are different, they are embedded in the final build file). Their paths may vary by platform, but they can be accessed through Application.streamingassetspath.
Reference:

Http://docs.unity3d.com/Documentation/Manual/StreamingAssets.html

Http://docs.unity3d.com/Documentation/ScriptReference/Application-streamingAssetsPath.html.

Reference: Http://wiki.unity3d.com/index.php/Special_Folder_Names_in_your_Assets_Folder

About Packaging:

1.Resources folder

The resources folder is a read-only folder that reads objects through Resources.load (). Because all of the resources under this folder can be loaded at runtime, everything under the Resources folder will be unconditionally hit in the release package. It is recommended that only prefab or some object objects be placed under this folder, because prefab will automatically filter out unwanted resources on the object. For example, I put the model file and the map file in the Resources folder, but I have two stickers that are not used on the model, then these two useless stickers will be packaged in the release package. If I use prefab here, then prefab will automatically filter the two unused stickers, so the release package will be smaller.

2.StreamingAssets

The Streamingassets folder is also a read-only folder, but it is a bit different from the resources folder, which is compressed and encrypted, without the use of the point special method is not able to get the original resources. But the Streamingassets folder is not the same, all the resources below it will not be encrypted, and then packaged into the release package intact, so it is easy to get the files inside. So streamingassets is suitable for putting some binary files, and the resources are more suitable for putting some gameobject and object files. Streamingassets can only use the WWW class to read!!

3. Finally, any resource files referenced in the hierarchy View object are also packaged unconditionally into the release package .

If a subset of the files may not be under the Resources folder or under the Streamingassets folder, and are not referenced by the hierarchy view game object, then such resources will not be packaged in the release package. When processing different packages corresponding to different resource bundles, try to make the configurable resources in the resource or Streamingassets folder, run the program dynamically to read them, and finally show in the game. Before bulk packaging, create a resource folder for different packages under Project view, and then script Assetdatabase to dynamically copy resources to the resource or Streamingassets folder

All the special folders in Unity

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.