Currently working with Quest 2 and Vulkan + URP, facing a lot of bugs where the whole device freezes, Vulkan render thread deadlocks, etc randomly. This only happens when the initial scene is loaded, which contains lots of scripts and third party plugins. Happens about 40% of the time and does not happen on OpenGL.
Unfortunately, I need to get a Vulkan build for reasons outside of my control, so gonna try some hacky methods currently. Is it possible to pause the Unity render thread so vulkan commands are not executed? I think this might be very helpful.
You can pause the game and make it render the same frame over and over again, but I don’t think you can pause the render thread. It might be possible to block it (maybe with an asynchronous query that never finishes) but then the main thread will block too. Not sure how pausing the render thread would help you anyways.
I guess, you could start the game in headless mode but don’t see how that’d help either.
It’s too bad, that Unity doesn’t come with Aftermath integration, like Unreal. That’s how you usually figure these kind of problems out. It is possible to integrate Aftermath yourself when you are using the DX11 backend but not sure about Vulkan. I’ve heard that some (all?) render events of the native plugin are only executed with DX11. It’s also a lot of work. (and it works only on NVidia GPUs)
I would update to the latest (beta) version to see if that fixes the problem. If it doesn’t, all you can do is commenting stuff out.
I’m afraid the only option to find a solution is start a fresh project in that unity version and slowly add the plugins and scripts untill it starts breaking.
Making a bug report might be good for long term and other developers