Enable or Disable URP with via script?
So the question is, it there a way to disable the URP to "none" via script and also re-enable it as well? I am building it for android and apple, although I haven't check on an apple device whenever I use URP the app runs fine on a higher power device, but when using URP with a slower it chugs along suuuuuuuper slow- but works just as well without the URP. So basically I want to know if there is a way so the player can click on a graphics option, so they can enable the lighting effects and if the device they are using has less power they can play the game by selecting "No Lighting Effects" for example. I would have to create a button or toggle to set the Graphics for lighting enabled in the app, that's not the question. The question is how I can access the Graphics in the Project Settings can be set to "None (Render Pipeline Asset)" on the "Scriptable Render Pipeline Settings". Can I access that and change it via script to set it to "None" or "UniversalRenderPipelineAsset." If so how do I access that part of Unity with a script to change that dynamically when the player clicks the butting on the game menu for Lighting Enable or Lighting Disable.
Thanks again!
Answer by juanlucas09 · Aug 28, 2020 at 09:29 PM
Do you already got it? I want to do the same thing,Do you already got it? I want to do the same thing...
Answer by Runthis · Jan 25, 2021 at 05:35 PM
@Beta4 @juanlucas09 Hey there. I wanted to flip this to NULL and was able to accomplish it using BOLT and a "List of Render Pipeline Asset" as an application variable. While adding the variable, when you press the + button to add a list item, it adds a "None (Render Pipeline Asset)".
_
In BOLT I then simply access "Graphic Settings" -> "Set Default Render Pipeline" and set it to that array item.