"Translate" special folders in the Unity Engineering catalog

Source: Internet
Author: User

Transferred from: Http://wiki.unity3d.com/index.php/Special_Folder_Names_in_your_Assets_Folder

Some specific names in unity have special properties for folders.

Hidden Folders

  Unity ignores folders with the. Start name (for example, ". Unittests/",". svn/"), resources placed in this folder will not be imported into unity, the script will not be compiled, and this type of folder cannot be seen in the drawing view. (Windows cannot be named under the. Start folder, which can be created by mkdir. XXX in cmd) (This type of folder is useless in our development, there is a reason may be in the project to do the SVN chain, update does not show. SVN folder Bar)

Standard Assets

  The scripts in this folder will be compiled first, and will be generated according to the language of scripting Assembly-csharp-firstpass or assembly-unityscript-firstpass or Assembly-boo-firstpass , refer to this article http://docs.unity3d.com/Documentation/Manual/ScriptCompileOrderFolders.html. (This folder is temporarily useless in development--)

Pro Standard Assets

  Just like the standard Assets folder, the resources here are used by the Professional (Pro) version of unity, such as some features of the pro version, render textures, screen-space effects, and so on ( The actual development is used in the pro version, like render textures inside the map used in the Resources folder, this folder temporarily also useless to

Similarly, scripts in this folder will be compiled in advance, allowing access to scripts outside of the Pro standard assets folder.

Editor

  The Editor folder allows the script inside it to access the API in Unityeditor, and if your script uses any class or function inside the unityeditor, then the script must be placed in a folder called Editor. (The Editor folder is the most used in the development of a folder, do the editing extension, the release process should be put in this area to do)

The scripts in the Editor folder will not be packaged in the published game, they are only used in editor mode.

You can have multiple editor folders throughout your project catalog.

It is important to note that if the Editor folder is not placed in a special folder then their location can be placed at will, but if they are under the special folder "standard Assets" or "Pro standard Assets" or "Plugins", They must be placed in the first- level directory of these special folders, otherwise it will not work. For example, the "My extension/scripts/Editor" path is the correct approach, but if the Editor folder is placed in a special directory, they must be, "standardAssets/ Editor/my extension/scripts "or"Pro standard Assets/editor/my extension/scripts "or" Plugins/Editor/my extension/scripts ".

Plugins

Put the native plug-ins (native plugins) that need to be accessed in the script into this folder, they will be automatically scored into the game release package, note that this folder must be placed in the assets folder, cannot be placed elsewhere.

On the Windows platform, plugins for. dll type files, on Mac platforms, plug-ins for. Bundle type files, on Linux platforms, plugins for. So type files.

As with the standard assets folder, the scripts in this script will be compiled ahead of time, allowing them to be called by other scripts outside of the plugins folder. (View official website document There is such a sentence "Phase 1:runtime scripts in folders called Standard Assets, Pro standard Assets and Plugins.", the RU in these three special folders Ntime script will be compiled in the first step)

plugins/x86

 If you make a 32-bit or universal (32-bit and 64-bit) version of the platform, if this subfolder exists, then the plugin in this folder will be automatically packaged into the game, if the folder does not exist, then unity will go to the parent folder (Plugins) to find the plug-in.

plugins/x86_64

 If you make a 64-bit or universal (32-bit and 64-bit) version of the platform, if this subfolder exists, then the plugin in this folder will be automatically packaged into the game, if the folder does not exist, then unity will go to the parent folder (Plugins) to find the plug-in.

If you are making a generic platform version, it is recommended that you create both the x86 and x86_64 folders, and place them in the corresponding 32-bit and 64-bit versions of the plugin.

plugins/android

 Put in this folder any. jar files (used by Java plugins) or. So files that need to be included in the Android project (used by the Android NDK plugin), for more information: http://docs.unity3d.com/ Documentation/manual/pluginsforandroid.html (This folder does not know much for the time being, compiling the APK is also not used Android project)

Plugins/ios

a restricted auto-add (as a symbolic link) any. A,. m,. mm,. c, or. cpp files to the generated Xcode project inside the method. can refer to: http://docs.unity3d.com/Documentation/Manual/PluginsForIOS.html.

If you want to have more control over the process of automatically adding files to the Xcode project, you can use the postprocessbuildplayer feature, and using this feature does not require you to put the appropriate processing files into the plugins/ The iOS folder. For more information, refer to: http://docs.unity3d.com/Documentation/Manual/BuildPlayerPipeline.html

Resources

Unlike the direct resource-referencing method of dragging resources directly from the editor to the Inspector panel script variable, the resources folder is a folder that allows you to read the resource directly through the path and name in the script.

It is for this reason that you have to be careful when placing resources in this folder. Because even though some of the resources in this folder are not used but are packaged into the final release package, because you use these resources through scripting, Unity has no way of detecting which resources are used or not.

There can be multiple resources folders in a unity project, but this is not recommended.

Once your game is released, all resources in the resource folder will be packaged in the game pack, which means that even if your code can read the resources from the resource path in the project, the resource folder will no longer exist in the final release package. Reference: http://docs.unity3d.com/Documentation/Manual/LoadingResourcesatRuntime.html

Note that when a resource is accessed by a variable in the Monobehaviour script, those resources will be loaded into memory when the Monobehaviour script is instantiated, and if the referenced resource is too large and you do not want to load it like this, You can put an oversized resource into the resources folder, then load them through the Resources.load interface, and when the resource is no longer being used, you can delete the resource through the Object.destroy interface and finally call Resources.unloadunusedassets frees up the memory it occupies.

Editor Default Resources

  This folder is similar to the Resources folder, except that the resource is only used by the editor script, if you need to load resources in your editor script, and these resources do not need to be packaged in the final release package, use this folder (for example, icons, GUI skins, etc.).

Because editor scripts are not monobehaviour scripts, you cannot refer to them by dragging resources onto the Inspector panel.

You can use the Editorguiutility.load function to load a resource in the Editor Default Resources folder.

Note that unlike the Resources.load function, the Editorguiutility.load function requires you to provide a resource suffix when loading a resource, such as "Myplugin/myskin.guiskin"

Again, we can remove resources through Object.destroy and then call the Editorunity.unloadunusedassets function to free up the memory occupied by Editorguiunity.load loading resources.

The Editor Default Resources folder can only exist in the entire project and must be located under the assets directory.

Gizmos

Put all the maps and icons used by the Gizmos.drawicon function into the Gizmos folder. The map in this folder can be accessed by name and can be used as a Gizmo in editor (can the Gizmo be interpreted as a small object?). ) Drawing to the screen.

webplayertemplates

is used to replace the default Web page in the Web version of the release package, any script in it will not be compiled, this folder must be placed directly under the Assets folder (that is, the top level directory), can not be placed under other folders. (This folder is useful in the development of wood)

streamingassets

Any resources in this folder will be copied to the release folder without any changes (except for mobile and Web publishing packages, the resources in Streamingassets will be packaged in a final release package), The path to the Streamingassets folder is different on each platform, but can be obtained uniformly through application.streamingassetspath. See also: 1.http://docs.unity3d.com/documentation/scriptreference/application-streamingassetspath.html) 2. Http://docs.unity3d.com/Documentation/Manual/StreamingAssets.html

Reference

1. http://tieba.baidu.com/p/3233940618 "Translation Stickers" special folder names under the Unity assets directory

2. http://www.xuanyusong.com/archives/3229 Unity3d Research Institute's hand tour all special folders in the development

"Translate" special folders in the Unity Engineering catalog

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.