game/godot

Godot3 - I/O Data paths

C/H 2018. 11. 17. 08:30

Data paths

Path separators

For the sake of supporting as many platforms as possible, Godot only accepts UNIX-style path separators (/). These work on all platforms including Windows.
가능한 한 많은 플랫폼을 지원하기 위해 Godot은 유닉스 스타일의 경로 구분 기호 (/)만 허용합니다. 이는 Windows를 포함한 모든 플랫폼에서 작동합니다.

A path like C:\Projects will become C:/Projects.
C:\Projects와 같은 경로는 C:/Projects가됩니다.

Resource path

As mentioned before, Godot considers that a project exists in any given folder that contains a project.godot text file, even if such file is empty.
앞서 언급했듯이 Godot은 프로젝트 파일이 비어 있어도 project.godot 텍스트 파일을 포함하는 특정 폴더에 프로젝트가 있다고 간주합니다.

Accessing project files can be done by opening any path with res:// as a base. For example, a texture located in the root of the project folder may be opened from the following path: res://some_texture.png.
res://를 기본 경로로 사용하여 프로젝트 파일에 액세스 할 수 있습니다. 예를 들어 프로젝트 폴더의 루트에있는 텍스처는 res://some_texture.png 경로에서 열 수 있습니다.

User path (persistent data)

While the project is running, it is a common scenario that the resource path will be read-only, due to it being inside a package, self-contained executable, or system-wide install location.
프로젝트가 실행되는 동안 패키지, 자체 포함 실행 파일 또는 시스템 전체 설치 위치에 있기 때문에 리소스 경로가 읽기 전용이되는 일반적인 시나리오입니다.

Storing persistent files in such scenarios should be done by using the user:// prefix, for example: user://game_save.txt.
이러한 시나리오에서 영구 파일을 저장하려면 user:// 접두사를 사용해야합니다 (예 : user://game_save.txt).

On some devices (for example, mobile and consoles), this path is unique to the project. On desktop operating systems, the engine uses the typical ~/.local/share/godot/app_userdata/Name on macOS and Linux, and %APPDATA%/Name on Windows. Name is taken from the application name defined in the Project Settings, but it can be overriden on a per-platform basis using feature tags.
일부 장치(예 : 모바일 및 콘솔)에서 이 경로는 프로젝트에 고유합니다. 데스크탑 운영체제 macOS 및 Linux에서는 ~/.local/share/godot/app_userdata/Name 및 Windows에서는 %APPDATA%/Name을 일반적으로 사용합니다. Name은 Project Settings에 정의 된 응용 프로그램 이름에서 가져 왔지만 기능 태그를 사용하여 플랫폼별로 재정의 할 수 있습니다.

반응형

'game > godot' 카테고리의 다른 글

Godot3 - I/O Encrypting save games  (0) 2018.11.20
Godot3 - I/O Saving games  (0) 2018.11.19
Godot3 - I/O Background loading  (0) 2018.11.16
Godot3 API - Singletons (AutoLoad)  (0) 2018.11.15
Godot 3.0.6 compile Success Process  (0) 2018.11.15