[언리얼 엔진] 블루프린트 String Path로 로드 시 주의할 점
·
언리얼 엔진
프로젝트를 새로 만들면 DefaultEngine.inl 파일에 bDontLoadBlueprintOutsideEditor=true 를 기본값으로 사용합니다. 즉, 에디터 이외엔 Blueprint를 로드하는 것을 지양하고 있습니다. 따라서 이 옵션이 true일 경우에 아래와 같은 코드는 에디터에서는 로드가 되어도 에디터 이외의 빌드에서는 MyBlueprint는 항상 nullptr입니다. FString BlueprintAssetPath = FString("/Game/MyBlueprint.MyBlueprint"); UObject* MyObject = Cast(StaticLoadObject(UObject::StaticClass(), NULL, *BlueprintAssetPath)); UBlueprint* MyBl..