You can get them by using adb.
Code: Select all
adb logcat > mylog.txt
Code: Select all
adb logcat > mylog.txt
Code: Select all
if (Target.Platform == UnrealTargetPlatform.Android)
{
AdditionalPropertiesForReceipt.Add(new ReceiptProperty("AndroidPlugin", Path.Combine(ModuleDirectory, "My_APL.xml")));
}
https://forums.unrealengine.com/showthr ... iles-alongChris Babcock wrote: The files are packaged so you cannot use low-level fopen to access them. You need to use the file system.
Chris Babcock wrote: The OBB is embedded in the APK in the assets directory as "main.obb.png".
just use extern FString GExternalFilePath and protect any code using it with #if PLATFORM_ANDROID / #endif.
Something like this should copy all the files in the provided directory (assuming it was in Contents) to GExternalFilePath:
Then you can give the filename to your third-party library prefixed with GExternalFilePath.Code: Select all
void CopyAllAssetsToExternal(FString inDirectory) { #if PLATFORM_ANDROID // only do this on Android extern FString GExternalFilePath; FString DirectoryPath = FPaths::GameContentDir() / inDirectory; IFileManager* FileManager = &IFileManager::Get(); // iterate over all the files in provided directory TArray<FString> directoriesToIgnoreAndNotRecurse; FLocalTimestampDirectoryVisitor Visitor(FPlatformFileManager::Get().GetPlatformFile(), directoriesToIgnoreAndNotRecurse, directoriesToIgnoreAndNotRecurse, false); FileManager->IterateDirectory(*DirectoryPath, Visitor); for (TMap<FString, FDateTime>::TIterator TimestampIt(Visitor.FileTimes); TimestampIt; ++TimestampIt) { // read the file contents and write it if successful to external path TArray<uint8> MemFile; const FString SourceFilename = TimestampIt.Key(); if (FFileHelper::LoadFileToArray(MemFile, *SourceFilename, 0)) { FString DestFilename = GExternalFilePath / FPaths::GetCleanFilename(*SourceFilename); FFileHelper::SaveArrayToFile(MemFile, *DestFilename); } } #endif }