Running a packaged game sometimes results in a black screen and no response

I use Unreal Engine to make a game, when the package out to play, sometimes can enter the game normally, but sometimes there is black screen no response, find delete the _PCD3D_SM6.upipelinecache file in C:\Users\Appdata\Local\project name\Save folder, Re-enter the game can start normally, but even this is still unable to avoid the next possible black screen no response.

According to the subsequent investigation, I may have mistakenly used the console command to switch on and off ray tracing, as shown in the figure below, because in the investigation, when I found a problem, it was most likely that I adjusted the ray tracing option.

Simply put, I made a pause menu in UMG, and then used the checkbox to execute the above nodes, the above two nodes I copied in Nvidia’s DLSS4 plugin blueprint, maybe turning on and off ray tracing should not be done this way?

So how do to normally let the player set the switch ray tracing? I don’t know much about this, or is there any way to get around it, such as cleaning up the old.upipelinecache file when a new game starts or let the.upipelinecache file is not generated when the game is quit.

I am a noob trying to learn unreal engine and hope to have some bigwig help me!

It’s also a matter of probability, and at the moment I can’t guarantee that it will happen again every time, sometimes it’s good to close the game and re-enter the game after adjusting the ray tracing option last time, and sometimes it’s not.

However, it is certain that after the _PCD3D_SM6.upipelinecache file is deleted, it must can enter the game successfully. If there is a black screen and no response, there is no response forever.