Special folder and script compilation sequence, script compilation Sequence
Zookeeper
Special folder and script compilation Sequence
In most cases, you can select the name of any folder you like in your project, but unity reserves some names to indicate that the content has a special purpose. Some of these folders affect the script compilation sequence. Basically, there are four separate scripts to compile. The script compilation stage is determined by the parent folder.
In this case, the script must reference the classes defined in other scripts. The basic rule is that nothing after the compilation phase cannot be referenced. The current or earlier stages in any compilation are fully available.
In another case, a language script must be written to a class defined in another language (for example, the UnityScript file that declares the class variables defined in the C # script. The rule here is that the referenced class must have been compiled earlier.
The compilation phase is as follows :-
Stage 1:In the running script folderStandard Assets,ProStandard AssetsAndPlugins.
Stage 1:In the Editor script folderStandardAssets/Editor,Pro Standard Assets/EditorAndPlugins/Editor.
Stage 1:NoEditorAll other scripts in the folder.
Stage 4:All the remaining scripts (that is, those calledEditorFolder ).
In addition, a name namedWebPlayerTemplates. This behavior is slightly different, and the name of the special folder that also works in the subfolders (for example, Scripts/Editor works as the Editor script folder, but Scripts/WebPlayerTemplates does not block compilation ).
A common example is that the UnityScript file must reference a class defined in the C # file. You can achieve this by placing the C # file in a non-special folder in the Plugins folder and the UnityScript file. If you do not do this, you will get an error and say you cannot find the C # class.
How to compile the script?
What is a script first? A Script is a collection of commands such as bind and alias. You can save the collection as an independent file and execute it as needed, this makes it easier for you to use in CS. The script can be saved as a file with the suffix. cfg in the cstrike folder. Enter exec (script file name). cfg in the console during execution. For example, if you save a script as a buys. cfg file, input exec buys. cfg in the console to implement the required functions. To implement a command, you only need to define this process (alias) and assign a key bit to this command. In the future, you only need to press the assigned key bit to implement this process. All scripts are implemented through this method. Statement Description: 1. the alias statement is used to assign values to parameters. Syntax: alias parameter name "value" 2. bind statement is the binding command, which binds a parameter assigned to an alias value to a key. The specific syntax is bind "key name" "parameter name" 3. "buy" is equivalent to pressing the "B" key; "buyequip" is equivalent to pressing the "o" key; "menuselect x" is the number of the corresponding purchase menu. For example, * if you want to buy ak47, you will start with B --> 4 --> 1. The corresponding script is buy; menuselect 4; menuselect 1; (separated by semicolons in the middle) * if you want to buy a ray and a flashlight, you will press o --> 4, o --> 3 at the beginning, and the corresponding script is buyequip; menuselect 4; buyequip; menuselect 3; note that the bind key cannot conflict; otherwise, bind is invalid. What is bind? Bind is to assign a command to the specified key. It can also assign an alias to the specified key. For example, bind "mouse1" "attack" indicates allocating the attack command to the specified key mouse1 (left mouse button). What is alias? Alias defines a name for a group of commands. After definition, CS considers this alias A common command. You can use the bind command to assign a key to this alias, you can also use it in other alias. For example: alias hw "say Hello World! "Then when you enter the hw command in the console and press enter to execute the command, you will say" Hello World!. You can also use the bind command: bind "v" "hw". When you press the v key, you also say Hello World to all players on the server! This sentence. For example: alias buym "buy; menuselect 3; menuselect 1" // (Note: equivalent to b-3-1) alias buyv "buy; menuselect 8; menuselect 1" // (note: equivalent to b-8-1) alias buysay "buym; buyv; hw" // (Note: The combination is defined together) bind j "buysay" // (Note: The combination is then defined to the j key) it indicates that after you run the buysay command (Note: press the J Key), you can purchase MP5 and normal bulletproof vests, and then say Hello Wor to all players on the server ...... remaining full text>
What are the rules used to compile a program?
Good LZ, script
Interpretation 1
A script is an executable file written in a certain format in a specific descriptive language, also known as a macro or batch processing file. Scripts can usually be temporarily called and executed by applications. Various scripts are widely used in Webpage Design, because scripts can not only reduce the size of webpages, but also increase the browsing speed, and enrich the webpage performance, such as animation and sound. For the most common example, mail software such as Outlook Express or Foxmail can be automatically called when you click the e-mail address on the webpage, which is implemented through the script function. Because of these characteristics of scripts, they are often used by others with ulterior motives. For example, add some commands in the script that damage the computer system. When a user browses the web page, once such scripts are called, the user's system will be attacked. Therefore, users should select a security level based on their trust in the accessed web pages, especially those webpages whose content is illegal, and do not allow the use of scripts easily. In the "Security Settings" dialog box, select various settings under the "script" option to easily disable and enable the script.
Interpretation 2
Dynamic programs generally have two implementation methods: Binary and script.
The second step is to compile the program into a script code that can be recognized by the machine (such as the .exe file) and then execute it. We can only execute and use this compiled program, but cannot see its content.
A script is a line of text commands, which we can see (for example, you can use NotePad to open, view, and edit). When the script program is running, it is an interpreter of the system, which translates the lines into machine-identifiable commands and executes them in the program order. Because the script has an additional translation process during execution, it is less efficient than the binary program.
Based on the current service rules, virtual host websites can only be implemented in script language.
What is a script?
A script is an extension of a batch processing file. It is a pure text-saving program. Generally, a computer script program is a combination of a series of computer control operations, some logical branches can be implemented.
Compared with general program development, script programs are closer to natural languages and can be interpreted and executed without compilation, which facilitates rapid development or lightweight control.
Currently, there are many scripting languages. Generally, the execution of the scripting language is only related to the specific interpreter. Therefore, as long as there is an interpreter in the corresponding language on the system, cross-platform can be achieved.
A Script is a collection of commands such as bind and alias. You can save the collection as an independent file and execute it as needed, this makes it easier for you to use in CS.
The script can be saved as a file with the suffix. cfg in the cstrike folder. Enter exec (script file name). cfg in the console during execution. For example, if you save a script as a buys. cfg file, enter execbuys. cfg in the console to implement the required functions. To implement a command, you only need to define this process (alias) and assign a key bit to this command. In the future, you only need to press the assigned key bit to implement this process. All scripts are implemented in 4131 through this method. Hope to help you!
Reference:. iarmyjw