For the most part, you can choose any names you like for the folders in your project but Unity reserves some names to indicate that the contents have a special purpose. Some of these folders have an effect on the order of script compilation. Essentially, there are four separate phases of script compilation and the phase where a script will be compiled is determined by its parent folder.
This is significant in cases where a script must refer to classes defined in other scripts. The basic rule is that anything that will be compiled in a phase after the current one cannot be referenced. Anything that is compiled in the current phase or an earlier phase is fully available.
Another situation occurs when a script written in one language must refer to a class defined in another language (say, a UnityScript file that declares variables of a class defined in a C# script). The rule here is that the class being referenced must have been compiled in a earlier phase.
아래는 컴파일의 각 단계에 대한 설명입니다.
Phase 1: Runtime scripts in folders called Standard Assets, Pro Standard Assets and Plugins.* Phase 1: Runtime scripts in folders called Standard Assets, Pro Standard Assets and Plugins. * 2 단계: 스탠다드 에셋, Pro Standard Assets, Plugins 상위 수준 폴더에 있는 Editor 폴더의 에디터 스크립트. * 3 단계: Editor 폴더에 있지 않은 모든 스크립트. * Phase 4: All remaining scripts (those that are inside a folder called Editor).Phase 1: Runtime scripts in folders called Standard Assets, Pro Standard Assets and Plugins.
순서의 중요성을 보여주는 예 중의 하나는 UnityScript 파일이 C# 파일에서 정의된 클래스를 참조해야 하는 경우입니다. C# 파일을 Plugins 폴더 안에 넣은 다음, UnityScript 파일을 특수 폴더 이외의 일반 폴더 안에 넣어야 합니다. 이렇게 하지 않으면 C# 클래스를 찾을 수 없다는 오류가 발생합니다.
참고: 스탠다드 에셋은 Assets 루트 폴더에서만 작동합니다.