Does UE4 has a built in function for creating a file directory inside the Project Content Directory?
I’ve currently found this FPaths::ProjectContentDir(), but need to create a file directory inside it.
FString Path = FPaths::ProjectContentDir();
Does UE4 has a built in function for creating a file directory inside the Project Content Directory?
I’ve currently found this FPaths::ProjectContentDir(), but need to create a file directory inside it.
FString Path = FPaths::ProjectContentDir();
Something like:
IPlatformFile& platformFile = FPlatformFileManager::Get().GetPlatformFile();
// Directory Exists?
if (!platformFile.DirectoryExists(*_folder))
{
platformFile.CreateDirectory(*_folder);
}
Where _folder is an FString of your folder path
yep, that works if I specify the path like this “C:\User\MyProject\Content\NewFolder\”, but that way it won’t really work when a new project is created and the path is different.
Append your directory to your FString Path rather than specifying it outright.