Script compilation is performed in 4 steps:
脚本编译包含4步:
1. All scripts in "Standard Assets", "Pro Standard Assets" or "Plugins" are compiled first.
所有"Standard Assets", "Pro Standard Assets"或"Plugins"文件夹里的脚本会被首先编译
Scripts in one of these folders can't directly access scripts outside these folders.
这些文件夹里的脚本不能直接访问文件夹之外的脚本.
It is not possible to reference the class or its variables directly,but it is possible to communicate with them using GameObject.SendMessage.
不能直接引用类或它们的变量,但是可以通过使用 GameObject.SendMessage 与他们进行通信.
2. All scripts in "Standard Assets/Editor", "Pro Standard Assets/Editor" or "Plugins/Editor" are compiled next.
所有在"Standard Assets/Editor", "Pro Standard Assets/Editor"或"Plugins/Editor"文件夹里的脚本会接着被编译
If you want to use the UnityEditor namespace you have to place your scripts in these folders.For example to add menu items or write custom wizards you have to place your scripts in those folders.
如果你想使用UnityEditor命名空间,你必须把你的脚本放到这些文件夹里.例如你想添加菜单项或自定义向导,那么你必须把你的脚本放到那些文件夹里.
These scripts can access scripts from the previous group.
这些脚本可以访问之前第一条里说的那些脚本.
3. All other scripts outside "Editor" are compiled next.所有在"Editor"以外的的脚本将紧接着被编译