Can I switch between URP and Built in Render Pipeline while the game is running?
What should I do if I can?
Can I switch between URP and Built in Render Pipeline while the game is running?
What should I do if I can?
I switched using this code method, is it correct?
using UnityEngine;
using UnityEngine.Rendering;
public class URPSwitchBRP : MonoBehaviour {
RenderPipelineAsset rpa_ = null;
void Awake() {
rpa_ = GraphicsSettings.renderPipelineAsset;
}
void OnGUI() {
var current = GraphicsSettings.renderPipelineAsset;
if ( GUI.Button( new Rect( 100, 50, 150, 50 ), "switching RP" ) ) {
if ( null == current ) {
GraphicsSettings.renderPipelineAsset = rpa_;
} else {
GraphicsSettings.renderPipelineAsset = null;
}
}
}
}
Bump, would like to know if OP’s solution is correct. Can any official devs confirm?