project settings package 可以指定非APK打包,确定资源是否发布
可以指定content下某个目录所有文件(非.uassert)都打包
ios环境下fopen打开文件需要指定路径
这么转换一下就可以了
FString ConvertToIOSPath(const FString& Filename, bool bForWrite) { FString Result = Filename; #ifdef __OBJC__ if (Result.Contains(TEXT("/OnDemandResources/"))) { return Result; } Result.ReplaceInline(TEXT("../"), TEXT("")); Result.ReplaceInline(TEXT(".."), TEXT("")); Result.ReplaceInline(FPlatformProcess::BaseDir(), TEXT("")); if (bForWrite) { static FString WritePathBase = FString([NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0]) + TEXT("/"); return WritePathBase + Result; } else { // if filehostip exists in the command line, cook on the fly read path should be used FString Value; // Cache this value as the command line doesn‘t change...staticbool bHasHostIP = FParse::Value(FCommandLine::Get(), TEXT("filehostip"), Value) || FParse::Value(FCommandLine::Get(), TEXT("streaminghostip"), Value); staticbool bIsIterative = FParse::Value(FCommandLine::Get(), TEXT("iterative"), Value); if (bHasHostIP) { static FString ReadPathBase = FString([NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0]) + TEXT("/"); return ReadPathBase + Result; } elseif (bIsIterative) { static FString ReadPathBase = FString([NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0]) + TEXT("/"); return ReadPathBase + Result.ToLower(); } else { static FString ReadPathBase = FString([[NSBundle mainBundle] bundlePath]) + TEXT("/cookeddata/"); return ReadPathBase + Result.ToLower(); } } #endifreturn Result; }
原文:http://www.cnblogs.com/wanliyun/p/6258054.html
【说明】:本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!