Unity - 라이브러리 폴더
출처 : https://docs.unity3d.com/Manual/BehindtheScenes.html
svn 같은 버전 관리 프로그램에는 유니티 라이브러리 폴더를 업로드하지 말라고들 한다.
유니티 사이트 설명에 의하면
svn 같은 버전 관리 프로그램에는 유니티 라이브러리 폴더를 업로드하지 말라고들 한다.
유니티 사이트 설명에 의하면
3. The source asset is processed
Unity reads and processes any files that you add to the Assets folder, converting the contents of the file to internal game-ready versions of the data. The actual asset files remain unmodified, and the processed and converted versions of the data are stored in the project’s Library folder.
Using internal formats for assets allows Unity to have game-ready versions of your assets ready to use at runtime in the editor, while keeping your unmodified source files in the the assets folder so that you can quickly edit them and have the changes automatically picked up by the editor. For example, the Photoshop file format is convenient to work with and can be saved directly into your Assets folder, but hardware such as mobile devices and PC graphics cards can’t accept that format directly to render as textures. All the data for Unity’s internal representation of your assets is stored in the Library folder which can be thought of as similar to a cache folder. As a user, you should never have to alter the Library folder manually and attempting to do so may affect the functioning of the project in the Unity editor. However, it is always safe to delete the Library folder (while the project is not open in Unity) as all its data is generated from what is stored in the Assets and ProjectSettings folders. This also means that the Library folder should not be included in version control.
라이브러리 폴더에는 asset 임포트의 결과물 즉, 당장 런타임 게임에 쓰이기 위해 준비된 내부 포맷이 저장된다.
게임에서 파일을 사용하는 예시로 텍스쳐를 들 수 있다. 일반적으로 포토샵 등에서 만들어진 png 파일은 사용자의 에셋 폴더에 직접 저장될 수 있다. 하지만 그 자체로는 gpu 등에서 곧이 곧대로 사용할 수 없다는게 문제. 이를 해결하기 위해서 유니티에서는 에셋의 내부 대체물을 따로 라이브러리 폴더에 저장한다.
일종의 에셋을 캐시 형태로 저장하는 것과 비슷하다.
에셋을 사용하기 편하게 대체물을 마련한 것이므로, 라이브러리 폴더 안의 내용은 함부로 수정하면 안된다. 하지만 라이브러리 폴더 자체는 지워버려도 큰 문제는 되지 않는다. 다시 에셋 폴더와 project setting 폴더를 리임포트하면서 라이브러리 폴더가 만들어지기 때문.
댓글
댓글 쓰기