Open RoyalDing opened 2 months ago
sorry,see here ,Hello, my code works fine in the editor state. When it is Packing, it doesn't work anymore. What did I do wrong?
对不起,看到这里,你好,我的代码在编辑器状态下运行良好。当它被打包时,它不再工作。我做错了什么?
同样的问题,所以......如何解决?
After the breakpoint test, it was found that it was a relative path problem. When it was in the editor, it used a relative path, on the path would be lost after packaging. converted the way to get the path to an absolute path is ok
对不起,看到这里,你好,我的代码在编辑器状态下运行良好。当它被打包时,它不再工作。我做错了什么?
同样的问题,所以......如何解决?
经过断点测试,发现这是一个相对路径问题。当它在编辑器中时,它使用了相对路径,在该路径打包后会丢失。转换获取路径的方式是绝对路径就可以了
所以。。。 1.使用 DebugGame 和断点测试 2.使用 FPaths::ConvertRelativePathToFull FString ContentPath = FPaths::P rojectContentDir(); FString modelFile = “模型/xx.obj”; FString modelFilePath = FPaths::Combine(ContentPath , modelFile ); FString modelResultPath = FPaths::ConvertRelativePathToFull (modelFilePath); _aiScene = UAssimpFunctionLibrary::ImportScene(modelResultPath , this, assimpProcessFlags, false);
这是程序吗?
In AssimpFunctionLibrary.cpp line 218, OutFilename variable results into an absolute path
Hello, my code works fine in the editor state. When it is bundled, it doesn't work anymore. What did I do wrong?