[UE] GInputini, Input.ini

Input.ini 값은 플랫폼에 따라 저장위치가 다르다. 예를들어, Window의 경우 경로의 경우 다음과 같다. Saved\Config\WindowsEditor. 언리얼 엔진에서 코드로 가져오면 다음과 같다. FPaths::Combine(FPaths::ProjectSavedDir(), TEXT("Config/WindowsEditor/Input.ini")); Input.ini 값을 사용하고 싶을때는 경로로 값을 가져오는 것 보다 전역변수 GInputIni를 사용하는게 좋다.
목차
GInputini, Input.ini
Input.ini 사용하기
Input.ini 값은 플랫폼에 따라 저장위치가 다르다.
ex. Window의 경우, Saved\Config\WindowsEditor
경로로 가져오는 경우 예시: FPaths::Combine(FPaths::ProjectSavedDir(), TEXT("Config/WindowsEditor/Input.ini"));
Input.ini 값을 사용하고 싶을때는 경로로 값을 가져오는 것 보다 전역변수 GInputIni를 사용하는게 좋다.
GInputIni
GInputIni 값은 설정 시스템 초기화 때 정해진다.
- FConfigCacheIni::InitializeConfigSystem()에서 전역 INI 이름들을 먼저 문자열로 설정한다. 여기서 GInputIni = "Input"으로 정해진다.
- 이후 FConfigContext::ReadIntoGConfig() 컨텍스트로 각 INI를 Context.Load("Input", GInputIni) 방식으로 로드한다.
이 로딩 과정에서 실제 파일 경로가 계층 규칙에 따라 해석된다. - 최종적으로 GInputIni는 현재 프로젝트·플랫폼에 맞는 DefaultInput.ini 계층(Engine/Config, Project/Config, Platform/Config, Generated 등)을 합쳐서 사용하는 대상 파일 경로로 해석된다.
- 코드에서 입력 설정을 읽거나 쓸 때는 GConfig->Get/Set*(..., GInputIni)로 이 파일을 참조한다.
코드
ConfigCacheIni.cpp
void FConfigCacheIni::InitializeConfigSystem()
{
// cache existence of a few key files that may be checked over and over
// this could be done with the Staged caches, but this will at least speed up a repeated FilExists check when not using binaryconfig
GConfigLayers[0].bHasCheckedExist = true;
GConfigLayers[0].bExists = DoesConfigFileExistWrapper(*FString(GConfigLayers[0].Path).Replace(TEXT("{ENGINE}/"), *FPaths::EngineDir()));
GPluginLayers[0].bHasCheckedExist = true;
GPluginLayers[0].bExists = DoesConfigFileExistWrapper(*FString(GPluginLayers[0].Path).Replace(TEXT("{ENGINE}/"), *FPaths::EngineDir()));
// assign the G***Ini strings for the known ini's
#define ASSIGN_GLOBAL_INI_STRING(IniName) G##IniName##Ini = FString(#IniName);
// GEngineIni = FString("Engine")
ENUMERATE_KNOWN_INI_FILES(ASSIGN_GLOBAL_INI_STRING);
#undef ASSIGN_GLOBAL_INI_STRING
InitializeConfigRemap();
//...
}
'⭐ Unreal Engine > UE Debugging Log' 카테고리의 다른 글
| [UE] 델리게이트 RemoveAll(this)를 왜 “맨 마지막”에 호출해야 할까 (0) | 2025.09.26 |
|---|---|
| [UE] 언리얼 에셋 파일 이동, Redirector 지우기 (0) | 2025.09.25 |
| [UE] TSharedRef를 키로 쓰는 TMap에서 Find가 실패 (0) | 2025.09.22 |
| [UE] error C3859: Failed to create virtual memory for PCH 문제 해결 (0) | 2025.09.22 |
| [UE] Visual Studio의 Output 창에 자동으로 Unreal Engine Integration이 뜨는 문제 해결 (0) | 2025.09.16 |
댓글
이 글 공유하기
다른 글
-
[UE] 델리게이트 RemoveAll(this)를 왜 “맨 마지막”에 호출해야 할까
[UE] 델리게이트 RemoveAll(this)를 왜 “맨 마지막”에 호출해야 할까
2025.09.26 -
[UE] 언리얼 에셋 파일 이동, Redirector 지우기
[UE] 언리얼 에셋 파일 이동, Redirector 지우기
2025.09.25 -
[UE] TSharedRef를 키로 쓰는 TMap에서 Find가 실패
[UE] TSharedRef를 키로 쓰는 TMap에서 Find가 실패
2025.09.22 -
[UE] error C3859: Failed to create virtual memory for PCH 문제 해결
[UE] error C3859: Failed to create virtual memory for PCH 문제 해결
2025.09.22