How can I take care of the delay downside when loading Datamith recordsdata in execution time?
Once I use the load file node within the DatasmithRuntime
Plugin To load the scene, there shall be a delay. Then I put the logic within the background thread with C ++ and tried it once more, and there’s nonetheless delay.
After downside fixing, I believe the load logic is carried out within the background, however the development of the mesh and collision physique and the scene replace are nonetheless carried out in the principle thread.
Does anybody know easy methods to take care of this delay downside? Can the impact of loading and visualization be achieved on the identical time?
void ABlueprintTest::StatrAsyncEvent(ADatasmithRuntimeActor* DatasmithRuntimeActor, const FString& FileName)
{
AsyncTask(ENamedThreads::AnyBackgroundThreadNormalTask, (DatasmithRuntimeActor, FileName)()
{
bool bSuccess = LoadFile(DatasmithRuntimeActor, FileName);
AsyncTask(ENamedThreads::GameThread, (bSuccess)()
{
if (bSuccess)
{
UKismetSystemLibrary::PrintString(nullptr, TEXT("File loaded efficiently!"));
}
else
{
UKismetSystemLibrary::PrintString(nullptr, TEXT("Filed to load file!"));
}
});
});
}
Once I use the load file and the explorer load file within the DatasmithRuntime
The complement within the airplane node, loading a scene of roughly 100 MB all the time causes program delay. Then, in C ++, I put the load file technique within the complement to run within the background, however nonetheless causes this system delay through the check. I hope that when loading the .udasmoth file, don’t block the thread or the principle display screen whereas loading.
When this system is executed to the operate of loading recordsdata, it won’t be able to work for a time frame, after which the mannequin can proceed to work after the scene is proven. The file loading course of doesn’t appear to make this system can’t function, however the development and presentation of numerous grids appear to have an impression.
The primary picture is the interface the place this system is caught, ready for just a few seconds earlier than it’s restored, and the mannequin will present that it has returned to regular.