The Editor folder can be in the root directory, can be in subdirectories, as long as the name is editor. /xxx/xxx/editor and/editor are the same, the number of folders called Editor can be. All resource files or script files placed under editor will not be punched into the release package, and scripts can only be used when editing. You can usually put the script for some tool classes here, or some of the DLLs used for editing. For example, if we were to do a similar skill editor, then the editor's code would be nice to put here, because we would only need the editor-generated files for the actual runtime, without the need for the editor's core code.
Editor Default Resources Note that there are spaces in the middle and must be placed at the root of Project view. The editor can be used to put some resources here, than slices, text files. It will not be hit in the final release package as in the Editor folder, only for development use. The resources under this folder can be read directly through the editorguiutility.load.
Common use: You can draw an icon in a scene view for a coordinate. It has the advantage of being able to pass a Vecotor3 as a picture display position. Parameter 2 is the name of the picture, of course, this picture must be placed under the Gizmos folder.
void Ondrawgizmos () { "0.png"true); }
The Ondrawgizmos () method, as long as the script inherits Monobehaviour, and it executes every frame in edit mode. The published game will certainly not be executed, it can only be used to draw small objects in the scene view. For example, to do a camera trajectory, it must be in the scene view to make a preview of the line, then with Gizmos.drawline and Gizmos.drawfrustum is better.
or directly in the Monitor panel settings, select other to set up the watch in scene scenes.
If you do mobile game development General Andoird or iOS to pick up some SDK can put the SDK dependent library files here, such as. so. jar. a file. This will automatically put the files in your bag after the package is finished.
The same editor, which can be in the root directory, can be in subdirectories, as long as the name is yes. No matter how many folders called resources are available. Resources folders are packaged in. apk or. IPA, whether you use it or not.
Resource.load: Both edit and run time can be read directly by Resource.load.
Resources.loadassetatpath (): It can read the resources under any folder in the Assets directory, it can be used at the time of editing or when the editor is running, but it cannot be used on the real machine, its path is "assets/xx/xx.xxx" This must be the path, with the suffix name of the file.
Assetdatabase.loadassetatpath (): It can read resources under any folder in the assets directory, which is only available for editing. Its path is "assets/xx/xx.xxx" must be this path, and with the suffix name of the file.
It is recommended to use Resource.load () or Resources.loadassetatpath () when developing on the computer, if you choose a part of the cell phone to play assetbundle, part of the resources resource.load (). So when doing. apk or. IPA is now automatically packaged with a script, you can use Assetdatabase.moveasset () to move the original files that have been packaged into Assetbundle from the resources folder before packaging, This way, the running package will not wrap up the extra files. After you finish the package, move the folder back.
The resources under this folder will also be packaged in. apk or. IPA the difference between it and the resource is that
The file will be compressed, but it will not be compressed and packaged in its entirety. And it is a read-only folder, that is, the program can only read and write when it is running. It has different paths under each platform, but you can use Application.streamingassetspath to select the corresponding path based on the current platform.
Some games in order to let all the resources use Assetbundle, will put some initial assetbundle in the Streamingassets directory, Run the program when you copy these assetbundle in the Application.persistentdatapath directory, if these assetbundle are updated, then download to the new assetbundle in the Application.persisten Tdatapath the original cover out of the directory.
Because the Application.persistentdatapath directory is the application's sandbox directory, there is no such directory before packaging until the application is installed on the phone.
Streamingassets directory resources are not compressed, so it compared to the General Assembly space, such as your application installed on the phone will occupy 100M of capacity, then you put a 100M assetbundle in Streamingassets, Then at this time on the mobile phone will be in the capacity of 200M.
Unity3d special folders in the engine