Hello,I am developing a game that include a switch sdk by Unreal 5.6, and it runs On Switch paltform. But the question is that nrr file can not be generated by Unreal. So it runs fail when mount ROM on Switch platform.
I have add the switch sdk in build.cs file, like :
string LibraryPath = Path.Combine(NativeLibDir, "Switch");
PublicIncludePaths.Add(Path.Combine(LibraryPath, "include"));
PublicAdditionalLibraries.Add(Path.Combine(LibraryPath, "nro", "xxx_shared.nro"));
System.Console.WriteLine("switch nro path: " + Path.Combine(LibraryPath, "nro", "xxx_shared.nro"));
RuntimeDependencies.Add(Path.Combine(LibraryPath, "nro", "xxx_shared.nro"), StagedFileType.NonUFS);
AdditionalPropertiesForReceipt.Add("SwitchResources", Path.Combine(LibraryPath, "xxx"));
mount ROM code:
void MountROM()
{
nn::Result result;
size_t cacheSize = 0;
result = nn::fs::QueryMountRomCacheSize(&cacheSize); // always fail
NN_ASSERT(result.IsSuccess());
// Allocate the cache buffer.
cache_buffer_ = new(std::nothrow) char[cacheSize];
NN_ASSERT_NOT_NULL(cache_buffer_);
// Mount the file system.
result = nn::fs::MountRom(SCHEME_ROM, cache_buffer_, cacheSize);
NN_ABORT_UNLESS_RESULT_SUCCESS(result);
}
when debug the project, the log:
NRR: Currently running executable (D:\project\xxx_switch\unreal_switch\Binaries\Switch\xxx-Switch-Debug.nspd) is not part of a packaged build, attempting to load NRR from alongside running executable
NRR: NRR file is not present alongside executable at ‘D:\project\xxx_switch\unreal_switch\Binaries\Switch\xxx-Switch-Debug.nspd/program0.ncd/data/.nrr/ModuleInfo-Debug.nrr’. Continuing search.
NRR: NRR file is not present at ‘.nrr/ModuleInfo-Debug.nrr’. Dynamic module loading will be unavailable
for help, is there any answer. thanks.